05-11-2017 03:13 AM
Dear all,
I have been working on creating a software to communicate with multiple devices with RS485 protocol. I have created my own VIs to only use VISA Open, VISA Write, VISA Read and VISA Close and no additional driver.
As the devices require different configurations (Baud rate, Parity, etc.), I need to open and close the COM Port each time I want to send or read something. Everything seems to work fine but after a random time of execution (may be 5 minutes, 15 minutes, 20 minutes,...), the line seems to be busy and no device can then give a positive answer until I turn off everything and restart.
I am using a temperature sensor (Tecon), two pressure sensors (Keller), one MFC (Bronkhorst), one gauge (Pfeiffer) and eight RS485 Relays and I am running a loop every 2 seconds to make measurements.
I will try to insert an error detector in each device's VI but if someone has already experienced such an issue, I would be very glad to hear some advice !
Thanks in advance for your answer !
Bests
Mathias
Solved! Go to Solution.
05-12-2017 01:16 AM
05-12-2017 01:36 AM
You mean that I should just use VISA Open at the beginning of my program and then change the configuration once I want to speak to one device in particular and then use VISA Close only at the end ?
Would it be more efficient or faster ?
05-12-2017 01:36 AM
Hi,
RS-485 is not a protocol but it is the hardware layer. Your devices probably use the ModBus protocol.
Show me your basic VI and a manual of one of the devices.
Kees
05-12-2017 02:25 AM
Here are the examples for the Brooks MFC and for the Keller pressure sensor.
I open these VIs independently in a main VI. Please send me your remarks and thank you very much in advance.
Brooks RS485 manual from page 4-3
Keller RS485 manual from page 5
05-12-2017 06:59 AM
Hi,
Had a quick look at your VI and I see two things.
First you are sending hexadecimal data so you should disable the termination character at the Configure port.
Second the time between write and read could be a bit short. But this depends on the performance of your device.
Kees
05-12-2017 10:11 AM
Thank you for this answer.
It helps me a little more but the problem is not solved yet. I will try looking from my side.
Regards
05-16-2017 04:11 AM
It seems that the problem is coming from one device in particular. When I remove it from the line, everything is working fine for indefinite time.
I'll try to contact the seller and get more information about it.
Anyway thank you for your advice K C and Albert.Geven.
Bests,
Mathias