NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Modbus API Discussion

The "Set Unit ID" will be ignored when using Modbus TCP (check the "Context Help" of the method). 

Have you created a separate TCP-connection for each of the Eurotherm 3504 devices?

 

______________________________________________

Marcus Törndahl (System Architect)
Message 431 of 529
(3,037 Views)

I have only one eurotherm and thus one tcp connection for it.

Currently, I can communicate with the module, but every so often the connection is dropped for some reason.

0 Kudos
Message 432 of 529
(3,035 Views)

Is there a limit on how often the application can read values from the Eurotherm 3504 device? Do you have a programmers manual for the device?

______________________________________________

Marcus Törndahl (System Architect)
0 Kudos
Message 433 of 529
(3,023 Views)

There must be a limit, I haven't found it in the manual, the manual itself is very scarce about communication. On the other hand, the problem occurs even at slow acquisition rates.

 

Right I have bypassed the problem by ignoring the error and resetting the communication when I detect one, but this is not really ideal and reliable. I'd like to get something more robust.

0 Kudos
Message 434 of 529
(3,018 Views)

Hi Supreeth.K

 

In fact, it was my mistake regarding the tcp connection. I have connected it properly to test the eurotherm.

 

Then, on a single read, the communication works, it just drops out every so often.

 

And I am aware that when the eurotherm is in config, it drops the communication. There is also no watchdog activated on the eurotherm in the current configuration.

 

Matthieu

0 Kudos
Message 435 of 529
(3,012 Views)

Marcus and Supreeth,

 

Thanks for your help, I think I found the problem. I said that the computer had two ethernet cards (realtek PCIe GBE familly controllers), which offers a nice feature of giving access to both an internal and an external network, with one configured with a fixed IP and the other on DHCP. I found online some people complaining about issues of connections with those cards. I thus tried with an external USB ethernet card and I've run it all weekend long without any error coming out. So I suppose there is some kind of interference between the two cards.

 

Thanks for your help again,

Matthieu

0 Kudos
Message 436 of 529
(2,977 Views)

Hi,

 

Is there any way to read out the raw incomming modbus commands somewhere in this library?

 

Regards 

 

Mrmas

0 Kudos
Message 437 of 529
(2,867 Views)

Hello,

 

I'm curious if anyone else has run into the error I linked. I've searched on this forum, as well as abroad to see if this is a Modbus TCP specific error. I haven't found any info anywhere that has been super helpful. 

 

The issue is when I try to read a holding parameter from my device more than 255 times. I have no issues communicating with the device, but if I loop the "read holding registers.vi" it will give me this error after 255 times. Is there a buffer somewhere that needs to be cleared out? I have tried reading for example 10 times and then using the Shutdown vi to close the connection. If I reopen a connection to the same device and continue reading after 255 times it will fault out no matter what. Is there something else I need to do to properly close the connection? I haven't found any documentation from the manufacturer on this matter either.

 

Thanks

 

Download All
0 Kudos
Message 438 of 529
(2,681 Views)

Hi ,

Not sure what the root cause of your error is.

 

I tried your VI with one of my modbus clients and there were no errors (despite running upto 400 times). So I dont think there is anything wrong with your VI (or the LV modbus API).

 

Try to replace your input tunnel (at the for loop) for your modbus connection reference with a shift register and see if it makes any difference.

 

Thanks and Regards,
Supreeth.K

0 Kudos
Message 439 of 529
(2,659 Views)

Thanks for the suggestion, I'll give that a shot and see if it helps.

 

I did play with the loop speeds, as this needs to be a read rate of (50-100ms). Running Wireshark while polling it looks like there were some connection issues at the 50ms mark. Looks like I may just have to slow the reading down as much as the application will allow. 

0 Kudos
Message 440 of 529
(2,655 Views)