How to control the modbus polling frequency

Hello,

I have not found the tips I was looking for in the forum page, so I ask if you can help.

For a simple program like the following one, I can read modbus registers, but the RS485 Sub leds are always blinking like the TB is continuously communicating with the slave.

10 TEMP = 3.10.MB_REG37
20 HUMIDITE = 3.10.MB_REG38
30 REM WAIT 00:00:10

Even when using the WAIT or INTERVAL command, the leds are still blinking continuously instead of blinking one each 10 seconds.

Also, sometimes the RS485 Sub configuration is turned automatically to Slave Mode, I have to put it back Master Mode.

Excellent question, we have been asked about this a few times now. In the system as it is now, the T3 controller polls when it has time between its other tasks. It will be helpful if there’s a default as we have now, so folks dont have to think about it, but also a setting to those who care about these things. We will add this to the todo list for the near future.

After you set T3 to Master mode, other Modbus devices on the RS485 Sub port are also masters and send read and write commands to T3. At this time, T3 will automatically change its Sub port to Slave. Then other devices can read and write T3 normally. If you are sure that you are fixed as Master, you can write the 91 register of T3 to 1.
In general, the modbus bus cannot have multiple masters. Please confirm that there are no other Modbus Master devices on the bus. Make sure there’s only one Master.
In case there are multiple masters on the RS485 bus, you can force T3 to be set to Master by writing T3’s register 91 to 1.

Fandu we need to merge master and slave to one single MODBUS setting. same for bacnet. get this done ASAP please.

Maurice

Hello,
While waiting for these modifications I tried with the commands TIME-ON, TIME-OFF and WAITING to manage a 10 second pause between two polling but it did not succeed. Could you suggest me a way?

The polling is done automatically in the background as one of the tasks running on the controller. Unfortunately there’s (currently) no method to control the polling activity in a user program.

Hello,

We are still waiting to know how to control polling frequency with an update from you. It seems we have too much trafic on our RS485 buses.

It wasnt on the todo list but we could have a look at implementing something. I would like to know more about what is going on in the network, perhaps I can make some suggestions to reduce the network activity. How many nodes and what is causing all the network traffic to begin with. Is there an oppostunity to do some block polling rather than single register packets.

The program is very simple (see below). Tha WAIT and TIME-ON commands have no effect. The RS485 LED of TBB and all slaves are continuously blinking. With the PLCs we used to use in our old projects, for energy consumption (like in this project) the polling time is 30s, so there is little traffic on the bus.
210 REM CE_AGTB_P1
220 VAR3 = 17.75.MB_REG_FLOAT_ABCD3059
230 WAIT 1
30 IF VAR3 > 0 THEN VAR1 = VAR3
40 IF VAR1 > 0 THEN VAR2 = 17.75.MB_REG_FLOAT_ABCD2699 / 1000
250 WAIT 1
260 REM CE_TGBT_P1
270 VAR8 = 17.76.MB_REG_FLOAT_ABCD3059
280 WAIT 1
30 IF VAR8 > 0 THEN VAR6 = VAR8
90 IF VAR6 > 0 THEN VAR7 = 17.76.MB_REG_FLOAT_ABCD2699 / 1000
300 WAIT 1
110 REM CE_AGTB_P2
120 VAR13 = 17.73.MB_REG_FLOAT_ABCD3059
130 WAIT 1
30 IF VAR13 > 0 THEN VAR11 = VAR13
140 IF VAR11 > 0 THEN VAR12 = 17.73.MB_REG_FLOAT_ABCD2699 / 1000
150 WAIT 1
160 REM REM CE_TGBT_P2
170 VAR18 = 17.74.MB_REG_FLOAT_ABCD3059
180 WAIT 1
30 IF VAR18 > 0 THEN VAR16 = VAR18
190 IF VAR16 > 0 THEN VAR17 = 17.74.MB_REG_FLOAT_ABCD2699 / 1000
200 WAIT 1
10 REM CE_AGTB_P3
20 VAR23 = 17.71.MB_REG_FLOAT_ABCD3059
30 WAIT 1
30 IF VAR23 > 0 THEN VAR21 = VAR23
240 IF VAR21 > 0 THEN VAR22 = 17.71.MB_REG_FLOAT_ABCD2699 / 1000
50 WAIT 1
60 REM CE_TGBT_P3
70 VAR28 = 17.72.MB_REG_FLOAT_ABCD3059
80 WAIT 1
30 IF VAR28 > 0 THEN VAR26 = VAR28
290 IF VAR26 > 0 THEN VAR27 = 17.72.MB_REG_FLOAT_ABCD2699 / 1000
100 WAIT 1

chelsea can have a look at adding some control over the network points under programmatic control. We need to keep a balance of making things automatic and simple versus your case where you want to manage polling yourself.

Chelsea, you could consider adding some new commands or perhaps a global setting to adjust the network refresh interval. Let us know here on the forum how often network points are refreshed as well please.

1 Like

When we read and write remote modbus points, we do not read and write them in real time according to the program code, so the read and write points are polled in a sequence successively. In general, the read is performed once for 100ms, but it has a low priority and usually becomes slower. If you have a lot of points to read and write, it may be slower.

So we see here the automatic polling is quite fast, 100ms for each object to be scanned. I assume this would be the same for bacnet as for modbus. When its just temco devices on the network and given that typical PLC response times for modbus are measured in millisecnds this would be suitable. When its a large network of Modbus or Bacnet devices with a mixture of slaves and masters from multiple manufacturers this would be quite a noisy environment, I agree.

We can add a note to add some commands for controlling the poll activity on a new version of the firmware soon.