LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP/IP Help

Solved!
Go to solution
Solution
Accepted by Heckler511

There is a way to do without code.

 

1) Create Modbus I/O Server (This step it's already done, right?), in "Configure Modbus I/O Server" popup, in "advanced..." Uncheck "first word low in 32 bits data types". This option is very important if you plan to use variables with other data types, especially Int32.

 

Configure Modbus IO Server

 

Advanced Attributes Settings

 

2) At this point you must deploy the ModbusIO (Library), since the aliasing type that we are going to configure at shared variable.

 

3) Create a variable, check "Enable aliasing", select "PSP URL" in "Bind to:", edit the URL, the important thing here is the "F" in Modbus Address (I used 301001, but you can use 300001 without problem)

 

SharedVariableProperties.jpg

 

Browse for Variables...

 

4) Deploy the Library and Enjoy

 

 Distribuited System Manager

 

The thing with addressing 30001 (Device) <-> 300001 (Modbus IO) is how Modbus protocol is implemented in each application, but it doesn't matter since you get the correct values.

Message 11 of 29
(4,043 Views)

Juliodiaz...that is awesome. I learned something new today, and will definitely try to write something up for future users on this! Smiley Happy

 

Edit - Do you mind if I reuse your screenshots?

Message Edited by Robbob on 01-20-2010 01:39 PM
Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
Message 12 of 29
(4,034 Views)
Robbob, feel free to use it and please improve it to share to anyone.
0 Kudos
Message 13 of 29
(4,023 Views)

Hi Rob,

 

Can that stuff be done programajicly?

 

Industrial monitoring apps often have hundereds of registers we need to touch so a programajic solution would be nice.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 29
(4,016 Views)

In LV8.0 it was the IO server that was the problem as I can remember. That you couldnt create that programmatically, but the option was there (but you just couldnt configuere IO server properties).

 

SV yes, with bindings etc. as well I believe, and they worked perfectly. Do not know if this has changed over the past years, havent tried.

 

 

Now I dont know if perhaps LV2009 is faster and better with SV (becaurse it was VERY slow and terrible when I tested hundreds), and perhaps im old-fashioned by liking datasocket better and prefer that over shared variables?

Message Edited by Corny on 01-20-2010 09:35 PM
0 Kudos
Message 15 of 29
(4,006 Views)

Programmatic control in LV8.0 (not verified with ->LV2009):

 

IO server - no

SVLibrarys - yes

Loading libraries into engine - yes

Unloading libraries from engine - yes

Shared variables and binding + other properties - yes

Message Edited by Corny on 01-20-2010 09:52 PM
0 Kudos
Message 16 of 29
(3,999 Views)

Ben wrote:

Hi Rob,

 

Can that stuff be done programajicly?

 

Industrial monitoring apps often have hundereds of registers we need to touch so a programajic solution would be nice.

 

Ben


Ben,

 

The IO server has to be made manually, but once that is done you should be able to create SV's since they are just bound to modbus addresses.

 


Corny wrote: 

 

Now I dont know if perhaps LV2009 is faster and better with SV (becaurse it was VERY slow and terrible when I tested hundreds), and perhaps im old-fashioned by liking datasocket better and prefer that over shared variables?


Shared variables had improvements in 8.2 and a huge revamp in 8.5, specifically with large numbers of variables and throughput. Their performance is just under the performance of direct TCP/IP with a RT FIFO.

highchantp.JPG

 

You can read more about the new SV engine at Using the LabVIEW Shared Variable

 

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 17 of 29
(3,996 Views)

Robbob wrote:

Shared variables had improvements in 8.2 and a huge revamp in 8.5, specifically with large numbers of variables and throughput. Their performance is just under the performance of direct TCP/IP with a RT FIFO.

highchantp.JPG

 

You can read more about the new SV engine at Using the LabVIEW Shared Variable

 


 

*Digging up old libraries from the 8.0 time* :):):)

0 Kudos
Message 18 of 29
(3,991 Views)
I'm curious what you have, since I couldn't find benchmarks of datasockets vs. shared variables. I love shared variables, although I know the pain that large channel counts can cause. I use the CompactRIO platform most often, and I find that I need to give more time for large numbers of shared variables on the lower-processor models(9072, 9073)
Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 19 of 29
(3,987 Views)

Are you thinking of the code I created in 8.0? that creates SV, libraries, folders etc, and engine control in labview? or am I misunderstanding stuff?

 

Remember when I tested SV on the fieldpoint when 8.0 just had arrived i only got trouble with them in large quantaties. Got problems with loading larger libraries into the engine, and when it said it had loaded them, it hadnt, and "vice versus". Think I tried all possible combinations on the fieldpoint. I think I also should have these test codes somewhere. After that Ive never used them again besides a project with a fieldpoint, and later one with the cRIO, but there where not many variables. (8 or something).

 

As of what I understood PSP is build upon DSTP? I do not know if that is correct? (long time since Ive investigated SV closely, since I gave that up in 8.0, but since its better now, I only miss the IO servers (to create them programatically) - and that should be just terrific 😛

0 Kudos
Message 20 of 29
(3,960 Views)