Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus communication problem

Hello everyone.

 

I'm currently trying to establish a communication between a Superflow SF1020 bench and Labview thought a Modbus protocol and I'm meeting a few troubles...

 

First of all, the device can be seen by MAX properly only when i just rebooted the computer. At this moment, I can open the VISA panel and see on his attributes that "Is Port Connected" has an "Invalid Property Value" on his current value. I have attached some photos so that it helps you understanding my problems.

 

At this point, I tried some examples found on modbus library or on topics given by labview community and It always starts the same way : I just have to choose "Com 1" for the visa ressource name before the system detect the instrument and so I can finally choose "ASRL1::INSTR". At this moment, MAX can only see that the interface name is "unknown". As the device is "reserved" by the program, I can understand that it is not usable anymore, but as I'm not an expert, I prefer to explain all the details, in case it could help.

 

Among all the examples I found, most of them end the same way, with the famous visa read error -1073807298 that I've never succeed in overpassing it, even with the help of many older topics :

http://digital.ni.com/public.nsf/allkb/0C2ABA463217342686256E2E006DF187

http://digital.ni.com/public.nsf/allkb/60DDFED7EFEFE7188625705700750821

and I just quoted the official solutions ...

 

Besides, I also tried to do a Modbus I/O server to see if there was any piece of informations that was transfered by the bench and there was none. As a result, the attribute "CommFail" was on true state...

 

As I'm not used to Modbus protocol or serial instruments, I'm not even sure if the communication was well set or if my problems come from the SF1020 or my lack of modbus communication knowledges. In that way, if any of you know how to solve my problems or at least one of them, help will be warmly welcomed 🙂

Download All
0 Kudos
Message 1 of 16
(4,933 Views)

Hi,

 

You use the DCS addressing method for a ModBus address.

In DCS if want to read the first Holding register they say 40001 

In ModBus this is: use function code 4 (or 3) and read address 0000

In your picture I see 40000. Change that address to 0000

 

Kees

 

Message 2 of 16
(4,899 Views)

Hi,

 

Thank you for your answer. I had already tried both and it comes to the same end, with the visa write error -1073807298. I wanted to read the 40000 adresses because this is what the datasheet given by Superflow Co. says. But, as it also says that my controller will automatically add "40000 or 40001" to the holding registers, I also tried your method, without success -_-

 

All I'm actually trying to do is to receive some informations about the bench, because this will ensure me the communication is well set and it will be easy then to build the VI. For the moment, I'm stuck trying to establish the communication. I've atttached the NItrace file in case it would help understanding my problem.

 

Best regards

 

 

 

Download All
0 Kudos
Message 3 of 16
(4,889 Views)

Try to read address 0 without the 4 !!!

I think you will see the firmware version.

 

0 Kudos
Message 4 of 16
(4,880 Views)

Yeah, that was my first try, unsuccessful.

0 Kudos
Message 5 of 16
(4,876 Views)

 You aslo have a newer version of the ModBus Library

http://www.ni.com/example/29756/en/

 

Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France

0 Kudos
Message 6 of 16
(4,849 Views)

Thank you Paolo but this is the library that I'm currently using.

If some people are interested, you can also find two newer libraries, but non-official. I don't recall links but it's not that hard to find when you're looking for it.

0 Kudos
Message 7 of 16
(4,845 Views)

Ok, still the error in your picture confuses me. The Init is OK but you get an I/O error during the read. This looks like a HW error.

 

Can you try the VI in the ZIP it will read addres 0 with funtion code 4. This is equal to the 40001 in the manual (at least in my world)

 

Kees

Message 8 of 16
(4,780 Views)

I'm sorry but I can't execute it since I'm using Labview 2012, could you send me another version of the VI pls ?

0 Kudos
Message 9 of 16
(4,756 Views)

Ok, here it is in LV 2012

Message 10 of 16
(4,753 Views)