You can subscribe to this forum after you log in or create your free account..
Posted: 2020-01-14 06:14 AM . Last Modified: 2020-01-14 06:20 AM
I am working in a Vijeo Citect v2015 application where I have LONG and ULONG data types variables, when mapped in graphic numiric representation these variables go crazy and show high value numbers instead of small correct value, I tried alteringlongdatatype parameter to all possible values, but still cant get the right values
I can use some advice
Posted: 2020-01-14 07:54 AM
This depends on the protocol used.In case of the MODNET protocol driver the Citect Help shows:
In the MODNET protocol, LONG data types default to a simplified implementation, with a shortened range of 0 to 99,999,999 for mode 0.
0 - implies 10,000 * low register + high register
Mode 2 has the same range as mode 0, but with the register order swapped.
1 - implies 65,536 * low register + high register
Mode 1 supports the complete LONG range of -2,147,483,648 to +2,147,483,647. Mode 3 has the same range as mode 1, but with the register order swapped.
2 - implies 10,000 * high register + low register
When using the MODBUS protocol, Citect SCADA combines two registers to store a long data type in a PLC. The way in which it does this is defined by this parameter.
3 - implies 65,536 * high register + low register
Note: This parameter is not applicable if you are using the protocol variant MODNET20 or MODNET30 to communicate with a device. Under these circumstances, a value of 3 will be hardcoded for this parameter.
With this parameter, you can set different values for specific I/O devices or groups of I/O devices. See Device/group-specific parameters.
Default is 3
Posted: 2020-01-14 08:21 AM
Yes I am implementing the basic variant MODNET, and I already tried all these parameters for longdatatype set to 0,1,2 and 3 , I can read from the device with Modscan with no problems, Citect for some reason can not display the values correctly
Posted: 2020-01-14 04:17 PM
Well.. .. if you already tried all possible LongDataType and the data is still showing up crazy.. . . i can only think of a possible address shift.. Eg... if you are polling tag address 40001, try setting that to 40000 or 40002. See what happens.
Posted: 2020-01-15 03:06 AM
I am sure that I am reading the meant registers
, this is really confusing
thanx for response
Posted: 2020-01-16 08:20 AM
It would still be worth trying to read what you think are the 'wrong' registers.
You wouldn't be the first person to be caught out by the Modbus address shift.
Posted: 2020-01-16 07:10 PM
Some modbus devices use 1-based addressing, others use 0-based addressing. When master and slave have different address base, the "shift" occurs. The fastest way to identify this issue is indeed by trial and error, since not all manufacturer state this in the modbus device manual.