Technical FAQs

Ask a Question

How can we read and write bit value of a variable created in Vijeo Designer.

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:


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.
Was this helpful?
What can we do to improve the information ?