Im trying to read a DInt tag from TIA Portal and the value is -4.
En Ignition Designer/Tag Editor/General Properties i have selected Data Type as a Long but the tag value dont have any relation with the real value, looks like i cant read the minus sign.
Probably is a very basic question but i’ll appreciate to have some help. Thanks in advance.
Is this using our Siemens driver? What address have you specified in the tag?
INT in Siemens is Short in Ignition (16 bit), DINT in Siemens is INT (32 bit) in Ignition.
If you want signed values in Ignition, you must specify the tag as I; if you want unsigned values, you must specify tag as W…
For example:
DB100, DI10 - signed value, DINT in Siemens (Integer in Ignition)
DB100, DW10 - unsigned value, DWord in Siemens ( Word or Int in Ignition)
Thanks very much, problem solved.
Necropost retracted - I was wrong =)
An “int” in the driver is 16 bits. An “int4” ignition tag is 32 bits.
Thanks. Apparently what I missed was basic math.
To further advertise my naivety, I couldn't seem to break the Siemens driver when reading an Int or DInt, and couldn't work out why Ignition was able to correctly flag an overflow. Turns out what matters is using the correct type in the OPC Item Path field, not the tag's Data Type field, duh.