You can use Variable Methods to read extracted bit and write to extracted bit of an Integer variable. The method to read Extracted bit is X and to write to any particular bit XW.
To use this if you have created an integer variable as var_1 then to read bits you can use the following syntax:
var_1.X(0)
This will return bit 0 status of integer variable var_1.
To write to you can use :
VariableName.XW(int position, boolean value);
For example
var_1.XW(0, True);
This will write value true to bit 0 of var_1.
Please take note that write operation can only be performed in Script as its return is INT type.
To use this if you have created an integer variable as var_1 then to read bits you can use the following syntax:
var_1.X(0)
This will return bit 0 status of integer variable var_1.
To write to you can use :
VariableName.XW(int position, boolean value);
For example
var_1.XW(0, True);
This will write value true to bit 0 of var_1.
Please take note that write operation can only be performed in Script as its return is INT type.
Released for: Schneider Electric India






Need help?
Product Selector
Quickly and easily find the right products and accessories for your applications.
Get a Quote
Start your sales enquiry online and an expert will connect with you.
Where to buy?
Easily find the nearest Schneider Electric distributor in your location.
Help Centre
Find support resources for all your needs, in one place.