01-20-2010 01:07 PM
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.
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)
4) Deploy the Library and Enjoy
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.
01-20-2010 01:36 PM - edited 01-20-2010 01:39 PM
Juliodiaz...that is awesome. I learned something new today, and will definitely try to write something up for future users on this!
Edit - Do you mind if I reuse your screenshots?
01-20-2010 01:50 PM
01-20-2010 02:11 PM
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
01-20-2010 02:33 PM - edited 01-20-2010 02:35 PM
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?
01-20-2010 02:48 PM - edited 01-20-2010 02:52 PM
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
01-20-2010 02:51 PM
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.
You can read more about the new SV engine at Using the LabVIEW Shared Variable
01-20-2010 02:55 PM
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.
![]()
You can read more about the new SV engine at Using the LabVIEW Shared Variable
*Digging up old libraries from the 8.0 time* :):):)
01-20-2010 03:00 PM
01-20-2010 06:10 PM
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 😛