Citect v7.40 SP2 - Modbus/TCP - Request wrong Word count

agoslinski

Member
Join Date
Jun 2016
Location
Poznan
Posts
10
Hello

I am trying to connect my Citect SCADA with power meter ASTec PRO380-Mod which is connected to my BMS network via MOXA MGate MB3170.
My problem is that when I lookup the packets send to Moxa with Wireshark or MGate Manager I can see that:

1. Citect sends request for register 4128 that I configured in citect.ini to check if power meter is available in network.

--citect.ini--
MODNET.PORT74_BOARD1.ASTec
- FloatMode = 1
- InitVar = 4128
- InitVarType = 3

--Modbus request--
[02 03 10 20 00 01 81 33]

2. Moxa sends the response with value 25 80 HEX = 9600 DEC under register 4128 (baudrate)

--Modbus response--
[02 03 02 25 80 E7 74]

3. Citect sends request for register 8200 (Real Voltage phase 1) which is my first variable configured in Equipment editor.

--Modbus request--
[02 03 20 08 00 7A 4E 18]

As You can see Citect sends request with Word Count = 122 (7A HEX) and it should be 2 (2 words = 4 bytes = 1 REAL value)

Moxa is unable to response to such request and after some time Citect starts to send request from the beginning (4128)

After bed request In Wireshark I can see packets such as:
TCP Dup ACK
TCP Keep-Alive ACK
RST

I did not have such problems using Modbus Poll program (modbustools com).

In attachment You can find screenshots from Wireshark and MGate Manager.

Could You please help me with my problem.

Best regards

Bad query.PNG Good query.jpg Good response.jpg Packet exchange.jpg
 
Hello

I am trying to connect my Citect SCADA with power meter ASTec PRO380-Mod which is connected to my BMS network via MOXA MGate MB3170.
My problem is that when I lookup the packets send to Moxa with Wireshark or MGate Manager I can see that:

1. Citect sends request for register 4128 that I configured in citect.ini to check if power meter is available in network.

--citect.ini--
MODNET.PORT74_BOARD1.ASTec
- FloatMode = 1
- InitVar = 4128
- InitVarType = 3

--Modbus request--
[02 03 10 20 00 01 81 33]

2. Moxa sends the response with value 25 80 HEX = 9600 DEC under register 4128 (baudrate)

--Modbus response--
[02 03 02 25 80 E7 74]

3. Citect sends request for register 8200 (Real Voltage phase 1) which is my first variable configured in Equipment editor.

--Modbus request--
[02 03 20 08 00 7A 4E 18]

As You can see Citect sends request with Word Count = 122 (7A HEX) and it should be 2 (2 words = 4 bytes = 1 REAL value)

Moxa is unable to response to such request and after some time Citect starts to send request from the beginning (4128)

After bed request In Wireshark I can see packets such as:
TCP Dup ACK
TCP Keep-Alive ACK
RST

I did not have such problems using Modbus Poll program (modbustools com).

In attachment You can find screenshots from Wireshark and MGate Manager.

Could You please help me with my problem.

Best regards

So what variable type have you got Citect configured as against the Tag on address 8200 ?
 
In powermeter documentation it is written that under register 2008 HEX (8200 DEC)Voltage L1 Read Only, 4x data blocks Float - Big Endian (ABCD)

So in Citect I configured it as REAL with address 48200.

One more thing I forgot to mention, I installed Citect on my laptop and made simple project and I configured two variables (baud rate uint 44128 and voltage L1 REAL 48200) same as on server and everything was ok.
On laptop and server I installed SP1 and 2 and on server I installed the latest MODNET driver.

The only difference is that on laptop I did not use equipment editor.
 
I think I know what's wrong.

Using Wireshark I checked other Modbus/tcp devices in my network.
It seems that Citect sends one request for all (or some part of) variables defined, it looks up lowest and highest register and sends request from the lowest register with appropriate value of Word count to get all registers from lowest to highest.

I think that my power meter is not able to send back such big response. How can I limit amount of registers in one request?

In attachment screenshots from wireshark of packet exchange between Citect and other Modbus/TCP device.

Good query 2.jpg Good response 2.jpg
 
Last edited:
I think I know what's wrong.

Using Wireshark I checked other Modbus/tcp devices in my network.
It seems that Citect sends one request for all (or some part of) variables defined, it looks up lowest and highest register and sends request from the lowest register with appropriate value of Word count to get all registers from lowest to highest.

I think that my power meter is not able to send back such big response. How can I limit amount of registers in one request?

You may be correct, i have seen some devices limited to one register requests.

You can limit the size of reads using the ini parameters for the driver MaxBits for example.

If you look under driver help in project editor and modnet all the parameters are listed there, be sure to only make the change per I/O device though, not globally on Modnet or you will cause serious speed issues.
 
Thank You very much for help, I saw that parameter but it looks like I misunderstood it's function.

I limited the parameter to 64 bits and everything works fine.
 

Similar Topics

With V5.50 I got this message when running the computer setup; 'Cannot continue. Unable to open 'master.dbf' Check USER path in citect.ini...
Replies
5
Views
5,404
Hello, I have a running project on Citect v5.42 and simatic net v6.4 I have created a new spare PC and loaded all software like Citect, station...
Replies
0
Views
68
Hello everyone, In a factory where we installed Citect 7.20 the computer began to show the first signs of end of life. They never considered...
Replies
0
Views
73
I have a running backup of Citect and plc and I want to make a spare PC station so I have installed the win XP and somatic net v6.0 and import the...
Replies
3
Views
121
I am trying to display a variable within a cicode function onto a graphics page. This function queries a SQL database. I can get the value onto a...
Replies
3
Views
287
Back
Top Bottom