02-04-2016 10:58 AM - edited 02-04-2016 10:59 AM
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?
Solved! Go to Solution.
02-04-2016 12:05 PM
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.
02-04-2016 03:29 PM - edited 02-04-2016 03:30 PM
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!
02-04-2016 04:02 PM
Glad to help. Don't forget to mark a post as a solution for other people who search for a similar topic.
02-04-2016 07:16 PM
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.
02-04-2016 07:20 PM
Gratsie
02-04-2016 09:57 PM
@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
02-08-2016 03:58 AM - edited 02-08-2016 03:59 AM
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.
02-09-2016 09:00 AM - edited 02-09-2016 09:03 AM
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.