From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why labview 8.51 change the variable name programatically and is there a better practice to create a driver for a modbus application using the DSC embeded driver in labview

first,
let me give you a few backgound,
im a developer (labview dsc) i work in the industry and im working in a project we choose labview because it works very ok with other application so we picked up for this one,
the problem is that this application is this big:
150 variables per device
250 devices
the variables include boolean, strings, double and some re-created variables,
most of this must be historized, so
the trouble i have is this one:
first,
when i create a new device, i use a library per device i used to copy the variables and create a new modbus driver for the device, inside the library, im using modbus tcp, so
to do this faster i copy the variables and then in the variable editor i link it to the right library name, so this sound very good,
obviously this sounds very easy, but well theres a think that i cannot escape, i always have to update the .vi with the new tags and it take a long time,
but well thats my work,
ok,
well my problem begins when i return to my application with 4 devices and realize that it changes de variable path to another library i men it gave me the data of other device and not the right one, so thast the first one,
and well in a stand alone app this could not be good,
the second trouble i ve recently,
ive add the 5, 6 devices,
so
the variable went down
giving me bad values,
i test it with kepware opc and it gave me the right values so its a labview problem,
my question is:
is there a reazon for this,
what am i doing wrong?
or whats the right way to create a driver (i dont see many configuration really or options)
somekind of recipe,
or i dont know anything..
im pretty mad about this because we trust in NI,
we used to work with 7.1 version
all was ok,
we try to upgrade to the 8.51 but i cant enjoy all the good stuff it has because it is giving me a lot of troubles...
so
any light in my path,
i still have to add 244 devices
thanks
 
P.D.
Ive found many errors more but those thinks are the one that i most care
 
0 Kudos
Message 1 of 4
(2,560 Views)

Hi Hazecks, A fast way to create Variables Binded to a OPC server for example Modbus is the following.

Add the IO server in a new library

Right-Click the library an select Create Bound Variables

In the menu select your IO server and select the range you want your variables to be Bounded to

Then add range. This will create a variable binded to that register of the OPC.

This way in a couple of minutes you can create all the variables.

 

If this is nor working for you, you can create the variables programmatically, you can find more details for that in this link: . How do I Programmatically Change the Data Binding Source for Shared Variables?

Also this Training for DSC you can Download Free : LabVIEW Module Training could have some interesting information.

Best Regards

 



Message Edited by BeCeGa on 05-27-2008 07:37 PM
Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 2 of 4
(2,519 Views)
ohh cmon men,
how you think i used to add the variables?????
 
read my trouble men first...
0 Kudos
Message 3 of 4
(2,492 Views)

Hi Hazeckz, you said you were coping the Variables and changing the Binding:  "when i create a new device, i use a library per device i used to copy the variables and create a new modbus driver for the device, inside the library, im using modbus tcp, so to do this faster i copy the variables and then in the variable editor i link it to the right library name, so this sound very good"

With this you create the variables directly binded to the Specific OPC server.

Did you tried the link for creating the Variables programmatically?

Best Regards

Benjamin C
Principal Systems Engineer // CLA // CLED
0 Kudos
Message 4 of 4
(2,446 Views)