41264members
184180posts

Vijeo Citect problem with Long data type

Highlighted
Ensign

Vijeo Citect problem with Long data type

Hi everyone

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

Regards

  • Osama
6 REPLIES 6
Highlighted
Lieutenant JG

Re: Vijeo Citect problem with Long data type

Hello Osama,

 

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

 

br

Rene

 

R.Roozee
Sr Solution Architect (SAE Master)
Highlighted
Ensign

Re: Vijeo Citect problem with Long data type

Hello Rene

 

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

Highlighted
Lieutenant

WelRe: Vijeo Citect problem with Long data type

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. 

Highlighted
Ensign

Re: WelRe: Vijeo Citect problem with Long data type

Hi Kingslim

 

I am sure that I am reading the meant registers

, this is really confusing

thanx for response

Highlighted
Lieutenant JG

Re: WelRe: Vijeo Citect problem with Long data type

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.

Highlighted

Re: WelRe: Vijeo Citect problem with Long data type

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.