02-24-2015 10:48 AM
Hi All,
Am new to labview, I want to create modbus slave simulator. I have connected through serial port to the master and treid to read the holding registers, the VI is executed succesfully but it doesnot show the expected register values read. Can you guide me with any of the examples to create Modbus Slave simulator.
Thanks in advance.
SS
02-24-2015 11:07 AM
You need to provide your code. There are also several examples if you search for Modbus under NI Example Finder.
02-24-2015 11:14 AM
Are you using the MODBUS Library for LabVIEW ?
That has VI's for a slave daemon.
Otherwise you will need to show us some code and more specific details as to what is working wrong.
02-24-2015 05:05 PM
Hi All,
Thanks for your response, Yes I did use some of the VI's from Modbus Library : MB Serial Example Slave VI and MB Serial Example Master VI, but upon modifying registers in slave its not updating on Master. PFA VI's am using. I have cross connected the two ports but still its not updating. Please advice
Thanks,
Savi
02-24-2015 07:27 PM
You can also try out this library:
https://decibel.ni.com/content/docs/DOC-30140
there is a master and a slave example on the palette which will have similar behavior to the examples in the library you're using, but the newer library is more efficient if thats going to be a concern for your application.
In either case, the code should work. Are you sure the cable you're using to connect the two ports is a null modem cable?
You can also completely emulate the connection using com0com: http://com0com.sourceforge.net/
02-25-2015 12:41 PM
Can you attach the code that you are using?
02-25-2015 03:42 PM
I have attached the screenshots of VI's that I was using from Modbus Library in previous posts, those VI's still don't read or write from slave or Master. But I found another example VI's which works good from Modbus Library.
The VI names are MB Serial Exmpale Slave.VI
and MB Serail Master.VI
Previously I was trying to run MB Serial Example Slave(legacy). vi
and MB Serial Example Master (legacy).vi (these still don't read or write the registers from slave or master, and I suppose the issue is with slave demon.vi).
Thanks everyone for the help.
Am still working on simulating Modbus slave by using these example VI's.
02-25-2015 04:39 PM
The pictures are missing.