User Tools

Site Tools


plc:plc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
plc:plc [2020/05/19 10:05]
ivan
plc:plc [2020/05/19 10:06]
ivan
Line 87: Line 87:
 It is possible to access the state of the output via gvarget commands from within the PLC process: It is possible to access the state of the output via gvarget commands from within the PLC process:
  
-<​code>​a= gvarget (0x400); // OUT0 +<​code>​a=gvarget(0x400);​ //OUT0 
-b= gvarget (0x407); // OUT7</​code>​+b=gvarget(0x407);​ //​OUT7</​code>​
  
 Starting from 0x400 to represent OUT0, this is a hexadecimal system that is simple to convert to dotted decimals (through the likes of a simple reference site [[https://​www.hexadecimaldictionary.com/​hexadecimal/​0x400/​|here]]). Thus, for example, //​gvarget(0x40d);//​ will return the state of Output #13.  Starting from 0x400 to represent OUT0, this is a hexadecimal system that is simple to convert to dotted decimals (through the likes of a simple reference site [[https://​www.hexadecimaldictionary.com/​hexadecimal/​0x400/​|here]]). Thus, for example, //​gvarget(0x40d);//​ will return the state of Output #13. 
plc/plc.txt · Last modified: 2020/09/04 14:18 by ivan