Stefan009

modbus NX102 - Read multiple modbus registers?

8 posts in this topic

Hi.

I have this project where we read out data from temp sensors and vaccuum stuff.
We use Pfeiffer vaccum cpt 200 for the vaccuum, and we create a frame to send to the modbus unit to pull a value from example '306'.

With all the current items we pull data, all the values are only updated every 5 seconds, is there a way to perhaps pull several frame/addresses in one request per device?
Current codes we read, some are in sequence of each others, but more has a bit of gap like 00, 02, 306, 307, 398, 330 and so on.

 

 

Share this post


Link to post
Share on other sites

hmm... that sounds awfully slow... what hardware? are you using Ethernet or serial? if serial what baud rate and how many registers we are talking about?

for performance it would be prudent to map all the monitored data into consecutive registers and read them all at once. also it would be good to make sure your target device is able to deal with the required transfer rates. 

in couple of recent projects i was using Ethernet to continuously read some 80 registers and write another 30. I chose to update every 100ms but as i recall ratcheting this to 10ms was not an problem at all.

 

Share this post


Link to post
Share on other sites

Hi

They are read by serial, we have 2 communication cards, some devices are modbus, these are modbus-kindish, we have to create a "frame"(?) and send 10 different numbers to read out the data from each device connected, currently there is 18 different calls to read out.

The NX-CIF105 is set to 9600 baud, 8 bits, even  parity, 1 bit stop bit, none flow control. During the end of this year we are going to build a 99% similar machine with a few more of these CPT 200s and this will increase the read times a little more.

We are using NX_SerialSend/Rcv to request the values.

 

 

 

13 hours ago, panic mode said:

hmm... that sounds awfully slow... what hardware? are you using Ethernet or serial? if serial what baud rate and how many registers we are talking about?

for performance it would be prudent to map all the monitored data into consecutive registers and read them all at once. also it would be good to make sure your target device is able to deal with the required transfer rates. 

in couple of recent projects i was using Ethernet to continuously read some 80 registers and write another 30. I chose to update every 100ms but as i recall ratcheting this to 10ms was not an problem at all.

 

 

Edited by Stefan009

Share this post


Link to post
Share on other sites

the key problem here is very low baud rate. crank that to 115.2kbps or even 230.4kbps and you will get 10x or 20x higher performance. 

another thing to consider is the actual process values. temperature changes are slow but pressure changes can be very fast. you could modify your code to read temperatures less frequently (say 10x less frequent). that could give you further bust. 

Share this post


Link to post
Share on other sites
16 minutes ago, panic mode said:

the key problem here is very low baud rate. crank that to 115.2 or  230.4kbps and you will get some 10x or 20x higher performance. 

According to the manual for the CPT 200, they have a fixed baud rate of 9600.

 

 

Capture.PNG

Share this post


Link to post
Share on other sites

is that really the only rate it supports? i would check with manufacturer if there is command to change the baud rate. 

another possibility is to split the network into two or more smaller ones. the fewer nodes are polled, the quicker the update. 

Share this post


Link to post
Share on other sites
17 hours ago, panic mode said:

is that really the only rate it supports? i would check with manufacturer if there is command to change the baud rate. 

another possibility is to split the network into two or more smaller ones. the fewer nodes are polled, the quicker the update. 

I have yet to hear back from their support, but nothing in the manual suggests changing the baud thought.
We might add another card to the plc just to speed things up polling the data we need.

 

EDIT: Just heard back from the manufacturer, the baud rate is fixed on these units and cannot be changed at all.

 

Edited by Stefan009
update info

Share this post


Link to post
Share on other sites

that is sad... many devices default to 9600 but could be convinced to change default to something else. i am doing this right now with some RFID readers. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now