LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I/O server versus VISA versus MODBUS library approaches to communication

Solved!
Go to solution

I have read several white papers from NI about the various ways to interface with instruments transmitting using MODBUS.

 

On the surface it appears to me that the I/O server is the easiest and fastest way to set this up just to get something going. Once I figure this out then I will have to determine if I really need a more low-level interface. It seems to me that even with the I/O server you can get low-level functionality. But this seems counter to what the white papers are saying. 

 

Would someone with more in-depth experience & knowledge about this subject be able to provide a short explanation of what type of low-level functionality you cannot get with the I/O server?

 

Also what are the benefits/drawbacks to using a VISA interface instead?

0 Kudos
Message 1 of 9
(3,655 Views)
Solution
Accepted by RavensFan

As a basic summary - VISA is the interface to the serial port allowing you to send and receive data but not to interpret what the data actually means (Transport Layer). Both the I/O Server and the MODBUS library are a layer on top of this - they use VISA internally to manage the basic part of sending and receiving raw data and focus on translating the raw data into a meaningful form (Protocol Layer).

 

If you were to use VISA directly you would have to add your own logic to translate general modbus commands into the raw data the server understands for transmission and reception, just like the I/O Server and MODBUS library.

 

I believe the I/O server requires licensing (DSC) and the MODBUS library is free.

Message 2 of 9
(3,642 Views)

Thanks tyk. Now I understand that VISA is just the serial port interface and does nothing for interpreting the raw data. So I would have to code in LabVIEW all of the data creation and manipulation.

 

Lucky for me we do have an active license for DSC. The I/O server really makes accessing the MODBUS device very easy. I was able to  communicate with my Sierra Instruments MFC in very little setup time.

 

My plan is to use the I/O server to send and receive data through a VI and do low-level transformations in that VI on some of the data received based on the specific data units, since the I/O server seems to only be able to report values from registers either as an integer or as a real number. This will let me skip reading strings of hex pairs and finding the specific location where the information I want starts, etc. and just read the values directly. So nice!

0 Kudos
Message 3 of 9
(3,623 Views)

Glad to help. Don't forget to mark a post as a solution for other people who search for a similar topic.

Message 4 of 9
(3,615 Views)

Mango17,

 

You need to mark tyk007's message as the solution to your question, not your own thank you message.  This gives him proper credit, and helps others in the future jump to the most helpful message if they are searching for the same problem.

 

You would fix it by selecting "Unmark as Solution" from the options menu above your message.  But I have already corrected that for you.

0 Kudos
Message 5 of 9
(3,591 Views)

Gratsie

0 Kudos
Message 6 of 9
(3,585 Views)

@tyk007 wrote:

As a basic summary - VISA is the interface to the serial port allowing you to send and receive data but not to interpret what the data actually means (Transport Layer). Both the I/O Server and the MODBUS library are a layer on top of this - they use VISA internally to manage the basic part of sending and receiving raw data and focus on translating the raw data into a meaningful form (Protocol Layer).

 

If you were to use VISA directly you would have to add your own logic to translate general modbus commands into the raw data the server understands for transmission and reception, just like the I/O Server and MODBUS library.

 

I believe the I/O server requires licensing (DSC) and the MODBUS library is free.


Well stated!  Thank you


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 9
(3,559 Views)

Oh, I think one important thing to bear in mind when using DSC is that it is one of the few components (along with Vision and Teststand) that requires a run-time license - that means if you create an executable that uses the DSC toolkit, you'll need to buy/install a deployment license on the target machine.

If you use the NI Modbus library - it just requires VISA so doesn't have any deployment license required.

 

There's no reason to use NI-VISA directly unless as a learning exercise - the NI Modbus library is pretty good and I think supports most (if not all) of the spec.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 8 of 9
(3,360 Views)

As a side note, and this may just be semantics, the MODBUS Library for LabVIEW is no longer recommended for new applications. Instead, I would use the (still free) LabVIEW Modbus API.

--------------------------------------
0 Kudos
Message 9 of 9
(3,300 Views)