05.01.2013 Views

eWON General Reference Guide - eWON wiki

eWON General Reference Guide - eWON wiki

eWON General Reference Guide - eWON wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.9.3.1 ValueName<br />

ValueName follows the below syntax:<br />

<strong>General</strong> <strong>Reference</strong> <strong>Guide</strong> IO Servers Configuration<br />

[PROGRAM:ProgName.]SymbolicTagName<br />

• ProgName is the name of the program where the Tag is.<br />

If no ProgName, the Tag is in the global scope (tag is controller type)<br />

• SymbolicTagName:<br />

• Symbol of the tag.<br />

Only following atomic type are supported: BOOL, SINT, INT, FLOAT, DINT (*), BIT ARRAY<br />

• Bit selection with /bit<br />

where bit is the bit number (from 0 to 31)<br />

ex: controlbit/4 read the bit 4 of the controlbit register<br />

• TIMER, CONTROL, COUNTER predefined types with .acc (or ctl or pre)<br />

ex: MyVar.acc read the counter of MyVar<br />

• Element of a table<br />

[idx_1].[idx_2].[idx_3].<br />

With maximum 3 index.<br />

ex: table1[2].subtable[6].element read data named 'element' on the index 6 of the 'sub table' from the index 2 of the 'table1'<br />

• Element of a structure<br />

.<br />

ex: CounterObj.init read the 'init' part of the structure 'CounterObj'<br />

(*) Important: To avoid loss of precision due to Integer to float conversion, choose the right storage DataType for your Tag.<br />

See "DataType of Tags" on page 75<br />

If you choose “Automatic” Tag type, <strong>eWON</strong> will use Floating Point as storaeg type.<br />

examples:<br />

• Status register:<br />

address point to<br />

myvar the data named “myvar” in the scope global (controller) of the PLC<br />

PROGRAM:myprog.myvar the data named “myvar” in the scope of the program named “myprog”<br />

myvar/4 the bit 4 (the fifth) from the data “myvar”<br />

mystruct.mydata the data named “mydata” from the structure named “mystruct”<br />

mytable[6] the element 6 (the seventh) of the table “mytable”<br />

mytablestruct[4].mydata[12] the element 12 of the table “mydata” from the structure at index 4 of the table “mytablestruct”<br />

The STATUS Tag is a special Tag that returns information about the current state of communication for a given device. As for other Tags, the<br />

status Tag ValueName is composed of:<br />

Status,GlobalDeviceAddress<br />

• You can define a status Tag for each COM port used.<br />

• If you use the status address, the Tag must be configured as analog.<br />

0<br />

Table 101: ABLogix address examples<br />

Communication not initialized. Status UNKNOWN.<br />

If no Tag is polled on that device address, the communication status is unknown.<br />

1 Communication OK.<br />

2 Communication NOT OK.<br />

Table 102: Tag status meaning<br />

RG-001-0-EN ver 1.14 <strong>eWON</strong>® - 02/05/2012 - ©<strong>eWON</strong> sa Page 126

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!