LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus in RT

OK, I'm stuck again! I've worked with Labview for 12 years but this is my first time with a PXI and RT module.
I'm using Modbus to talk to a touchpanel (CMore). When I first got it working (posts from last week) everything concerning the modbus was under My Computer in my project. The CMore read stuff from my program and wrote stuff back.
Now I'm trying to write everything for the actual RT stuff in the PXI. And of course, I cannot get it to work.
Questions:
-- In my original program, I used the modbus slave. I tried that under RT and it doesn't work. I created variables 100001 and "bound" them to the modbus address. I even tried setting up the modbus Master but that didn't work either.
Has anyone done this? The computer is not part of the finished machine so everything will be in the PXI.

Any help is greatly appreciated.

0 Kudos
Message 1 of 4
(4,729 Views)

Hi task,

Reading your earlier posts, it looks like you were using the Ethernet VIs from the Modbus library.  When you say you tried using the Modbus slave in Real-Time, was that the Example Slave VI?    

Also, are you able to communicate between your PXI system and your PC using Modbus?   

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(4,703 Views)
I actually followed this example:
http://www.ni.com/swf/demos/us/labview/dscmodbus/
I'm not using the DSC module but it was pretty close.

Yes, everything communicates now because the modbus variables are shared variables. For some reason, the choice of "create bound variables" is not available when setting up the modbus variables under the PXI system; you have define each one "create, new, variable". I got around that by setting them up in a temporary library under "My System" and then just moved them to the shared library.

Thanks,
Teri
0 Kudos
Message 3 of 4
(4,683 Views)

Hi Teri,

I'm glad to hear everything is working.  Thanks for posting your solution. 

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(4,548 Views)