How can a variables individual bits be accessed?

In certain cases you may need to "read/write" one single bit of a variable (byte, word etc).  Movicon allows you to do this by using the "VariableName.bitnum" syntax. For example if you want to use the variables first bit (0) of "VAR00001" which is declared as a WORD datatype, use the following syntax:

VAR00001.0

The type of syntax is supported in nearly all the project's resources.  For instance you can do this in the following:

  • Symbol animation properties

  • Alarms

  • IL Logic (X1 version only)

  • Event Object List

  • Scheduler Object List

  • In general, all the resource fields where variables can be entered

Variable bit pointing is NOT supported in the Movicon Basic Scripts.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.