Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

rs232 problem

We are using Lookout V6.0.1 along with Zetron M1700 controller and M1708 RTUs. Lookout communicates with the controller using modbus protocol 4800, 8, N, 2. When we put the Zetron controller in the dumb terminal mode and use Hyperterminal, each RTU responds perfectly. As soon as we boot into Lookout the controller polls hundreds of times to poll 23 sites. This should be 23 polls. The system is radio based so I refer to polled as the radio keyed and sent out a packet. When Lookout is running it seems as if the software is causing the controller to poll and is not waiting for a response. Each of the 23 sites has 8 digital inputs and no outputs. The controller has one digital output and no inputs. No analog signals are being used. The final symptom of this is that there are random Comm Failures. I installed this INI file

 

[all]
RefreshOutputs = 0
UpdateOutputs = 0
SkipImmediatePoll = 1
Protocol = RTU

 

Any updates or ideas?

0 Kudos
Message 1 of 17
(8,031 Views)

Are you getting the correct data back?  Have you played with the timeouts and retry values for the Lookout modbus object?  Some devices can't handle block reads.  Have you tried limiting your holding register block read size to 1 or 2 (double precision) instead of the default 125?

Ed

Message Edited by erblock on 04-28-2009 01:06 AM
0 Kudos
Message 2 of 17
(8,024 Views)

           To be honest, I'm not sure how to figure out if I'm getting correct data. The only thing I can add is that the radio fsk data is always correct without Lookout. Once I start lookout I haven't figured out how to determine exactly what is happening.

            I just found out from Zetron that this is apparently a known problem between lookout V6.0 and greater. Apparently if any digital outputs are used, lookout will randomly start writing the outputs and never take time to listen for a response no matter what the poll parameters are set for. Since we are not using any outputs nor anything analog, I'm going to try to set the read coils, read holding regs, read inputs, force coils, and preset regs all to 0. I will also set the read discrete inputs to 8 since we only have 8 digital inputs at each rtu. This is a hail mary on my part.

0 Kudos
Message 3 of 17
(8,007 Views)

Let's take a look at the communication first. Make a log file by selecting Options->serial ports, configure the diagnotic file. The log file can tell us what happened in the hundreds of polls.

What's the timeout and retry attemps you set for Modbus object? What's the poll rate?

Ryan Shi
National Instruments
0 Kudos
Message 4 of 17
(8,001 Views)

I have tried to attach the log file but it is not working. I have copied some  of the  diag file below.   The poll rate is  set to 10secs. We have tried 15 and 20secs as well. The retry attempts are set to 10 and have tried 20 and 25. The timeout is 5000msecs and we have tried 10000 and 25000msecs. I understand that lookout does not do any of the radio polling. It strictly asks the controller for the info stored in the buffer from the rtus. Am I right becuase this is not what is happening. Please explain if I have this wrong.

 

Modbus1 - RTS high (0 msecs)
12:28:46.6 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:28:46.6 - AveryRoad <-
[07]
12:28:46.6 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:28:47.7 - AveryRoad <-
[55][6E][69][74][20][39][20][6E][6F][20][72][65][73][70][6F][6E][73][65][0D][0A]
12:28:47.7 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:28:55.9 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:29:03.8 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:29:11.6 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:29:19.4 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:29:21.8 - BLACKASH <-
[55][6E][69][74][20][31][30][20][6E][6F][20][72][65][73][70][6F][6E][73][65][0D][0A]
12:29:21.8 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:29:29.6 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:29:37.4 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:29:45.4 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:29:53.6 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:29:55.8 - AveryRoad <-
[55][6E][69][74][20][31][31][20][6E][6F][20][72][65][73][70][6F][6E][73][65][0D][0A]
12:29:55.8 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:30:04.0 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:30:11.9 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:30:19.7 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:37:15.9 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:37:18.3 - Modbus1 <-
[55][6E][69][74][20][32][34][20][6E][6F][20][72][65][73][70][6F][6E][73][65][0D][0A]
12:37:18.3 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:37:26.1 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:37:34.0 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:37:41.8 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:00.9 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:08.8 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:16.6 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:24.4 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:32.2 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:51.9 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:38:59.8 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:39:07.6 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:39:15.4 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:39:23.3 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]
12:39:42.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:39:50.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:39:58.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:40:06.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:40:14.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:40:33.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:40:41.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:40:49.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:40:57.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:41:05.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:41:24.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:41:32.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:41:40.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:41:48.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:41:56.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:42:15.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:42:23.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:42:31.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:42:39.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:42:47.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:43:06.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:43:14.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:43:22.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:43:30.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:43:38.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:43:57.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:44:05.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:44:13.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:44:21.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:44:29.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:44:48.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:44:56.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:45:04.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:45:12.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:45:20.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:45:39.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:45:47.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:45:55.6 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:46:03.4 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:46:11.2 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:46:30.9 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]
12:46:38.8 - Modbus1 ->
[01][02][00][00][00][02][F9][CB]

0 Kudos
Message 5 of 17
(7,979 Views)

Lookout modbus object polls the Modbus salve devices for the data. It doesn't care how the modbus slave gets the data, it just send commands to the slave for reading values stored in the addresses. But from the log file, it seems that the Modbus slave never returned correct data, so the modbus master retried again and again.

 

What command or data did you send to the controller in HyperTerminal? Did you also use the Modbus protocol in Hyperterminal? The log file from Lookout tells us exactly what data are sent out to the port. So if it is same as what you sent via Hyperterminal, the response should be same. We can compare the data you sent from HyperTerminal and the ones from Lookout.  

Ryan Shi
National Instruments
0 Kudos
Message 6 of 17
(7,967 Views)

I have notice 2 things about the diag. The data is seems to be polling faster than our poll rate. Also in the beginning of the log you see names of the sites and then it changes to only Modbus 1. All of our sites are labeled. Is this explainable?

 

Example of polling time 

 12:28:46.6 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:28:46.6 - AveryRoad <-
[07]
12:28:46.6 - AveryRoad ->
[02][02][00][00][00][02][F9][F8]
12:28:47.7 - AveryRoad <-
[55][6E][69][74][20][39][20][6E][6F][20][72][65][73][70][6F][6E][73][65][0D][0A]
12:28:47.7 - AveryRoad ->

 

 Example of labels difference.

12:30:19.7 - BLACKASH ->
[03][02][00][00][00][01][B8][28]
12:37:15.9 - Modbus1 ->
[01][02][00][00][00][01][B9][CA]

 

I was not able to send you the complete file due to limitations of 10,000 characters. If you want me to email you the full file let me know.

 

We are also going to run an rs232 logging software to do more test. Listen32 is the software

 

 

0 Kudos
Message 7 of 17
(7,959 Views)
I forgot to include that In hyperterminal it is not using modbus protocol
0 Kudos
Message 8 of 17
(7,958 Views)

Let's look at your examples first.

At 12:28:46.6, a reading command is sent to modbus slave.

At the same time, it gets response from modbus slave, but the reponse is not valid. So, lookout modbus object directly resends the command, at 12:28:46.6. at this time, it is not a new poll, but a retry after a response failure.

 

The "AveryRoad", "BLACKASH" and "Modbus 1" are all the modbus objects' names in your Lookout process. I think you have a modbus object called Modbus1 in your process, and it is also configured to read some addresses. In your last post, the Modbus1 object seems to poll the modbus slave for tens of times. Take a look at this object in your process, what's the retry attempts of it?

 

In Lookout, select Option->Serial, select the COM port you use. Try to increase the Receive Gap to higher, such as 100 or 200.

Is it a hardwired connection or radio connection between computer and the controller?

Maybe the controller is not configured well for Modbus protocol?

Ryan Shi
National Instruments
0 Kudos
Message 9 of 17
(7,954 Views)

I have no modbus objects labeled "MODBUS 1"  do you know how I can email the file/process to you?

 

I had changed the rcv gap from 20 to 30 to 100 and I just walked the customer thru changing it to 200.

0 Kudos
Message 10 of 17
(7,949 Views)