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: 

Shared Global Channels Across Network

Hello again everyone,
 
Here is what I would like to do.
Within our lab we have multiple test stands that all use the same PCI-6221, SC-2311 and matching modules.  Currently each station has its own global channels calibrated for that station.  What I want to do is have one central location were all the global channels are located and have all the work stations pull the global channels from that location.  I have done some testing and proved that if the calibration is done on one system and used on the others the difference is below 0.5% which is acceptable for our applications.  However I have been unable to find any information on how this would be accomplished or if it is possible.
 
Thank you in advance for all your responses.
Steve
0 Kudos
Message 1 of 11
(3,921 Views)
Hey Steve,

Reading through your post I am having a hard time seeing what benefit you gain by having them all look to the same global channel.  I think if I understood what you were trying to avoid having to do I could be of better help to you.  Are you trying to avoid configuring the global channels on each PC?.  The best way to do this would be to get it all working on one PC, then export your MAX configuration to each of the other PCs.  If this does not sound like it would give you the behavior you need can you explain what else you hope to gain by having all of your PCs looking at the global data configuration on one PC.  The only way to do this would be VI server, and you would be programatically in LabVIEW creating a task using that channels information, but it would not be as simple as just telling LabVIEW to look at the global channel on a different PC.  We would have to take all the information defined in the global channel and pass it piece by piece using shared variables.  Let me know if you think just exporting the directories will give you the behavior you need, and we will work from there to get this issue resolved.

Have a great day,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 2 of 11
(3,903 Views)
Hello,
The main purpose of this project is to simplify transducer tracking and calibration.  Currently when a transducer is do for calibration it either has to be calibrated on one station and then export the global channel to each individual machine or calibrate it on each machine.  If a new transducer is added to the lab then the global channel needs to be created on each PC or created on one PC and exported and imported to the other PCs.  My goal is to have one station were the transducer calibrations are done and were new channels are added and have those changes automatically trickle down to the other PCs.  I'm hoping that this behavior will give each machine an up-to-date view of available transducers within the lab.  The vi server method seems like the behavior I am looking for, I have never done any work with the vi server other than some basic training allowing a front panel to be manipulated from a web browser.  Any information regarding the use of the vi server in this application would be very helpful.
 
Right now in the vis running in the lab the user selects the proper transducer (global channel) from a drop down box.  I would like that drop down box to list all available transucers (global channels) that are valid on the central machine.  This is probably going to be a programming project but I'm always up for a good challenge.
 
Thanks for your response
Steven.
0 Kudos
Message 3 of 11
(3,899 Views)

RDA used to be useful for this...

Otherwise VI Served Action Engines could do this work with some support functions that do the actual I/O and keep the AE's updated. The AE could also allow or prevent the same channels to be shared across PC.

Then again there is  DSC that could help depending on the throughput requirements.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 11
(3,892 Views)
Hi Steve,

I understand what you are going to want.  The drop down menu is going to require a fair bit of programming, and before we just jump into using VI server to pull the material off of the main instrument computer lets make sure we know all the tools we will have at are disposal.  What version of LabVIEW will we be working with and what development enviroment do you have,  Professional, base, Dev suite? 

 I am still discussing this with others and seeing if there is an example of this being done already.  However it seems that we could have one shared variable that was constnatly being output by your main instrument PC.  This would be an enum preferrably, though it could just be an array of strings.  This list would be your global channel list.  Once you selected the global channel, then we would have a sub VI run a program on your main instrument PC using VI server.  This program will make a task based off of that global channel, and using other shared variables we could pass all the parameters of that global channel back to the work station PC.  Then you could create a virtual channel based on those values.  That is how I would architect the application right now. 

I am going to look for a simpler solution and will also put toghether some information on using VI server.  Really all you will be using are the open application and VI reference function in the Application Control pallette.

Have a great day,

Michael D
Application Engineering
National Instruments
0 Kudos
Message 5 of 11
(3,874 Views)

It is still not clear to me EXACTLY what you want to do but maybe if I outline some tools it will help.  These are possible things I could see you using to accomplish your goal.  I am not sure you are going to be successful with VI Server but it is an option.

 

1.  In LabVIEW 8.0 and greater there is a MAX VI where you can programatically import and export files.  One possibility in the beginning of your program would be to go out on the network and export the configuration from your server machine, save that ini file to the local system and then programatically import that file into MAX.  Now you have access to all of the global channels that were on the server, but of course the same hardware needs to be on the client (which is kind of what I read from your original e-mail.  The ONLY thing I am not sure will work or not is if you can export to an IP address that is running Windows.  I know if the target/server was an RT controller it would be no problem, but since in your case it is a Windows machine I am not positive...but it is an easy experiment.

2.  You can use the DAQmx I/O server.  This uses the LabVIEW shared variable technology in conjunction with MAX.  From your client system(s) you can create a variable which points at the global channels on your server.  The only issue I see with this is if you create a new global channel you will also need to create a new variable.  I can't think of a way to programatically create a variable, but that might be my lack of knowledge on that subject.  It might very well be possible to get a list of global channels and then programatically create the variables.

3.  As someone else mentioned you could also programatically create all of your global channels on the client.  Again, one way you could do this is export the server information to a text file.  You could just do this everytime you make a change to the server.  Store that file in a common location, then read that file in on the client system, parse through the data, and programatically create the channel in MAX

 

These are the options I can think of...hope they help.

StuartG

0 Kudos
Message 6 of 11
(3,868 Views)
Hello Everyone,
Its good to see so much interest in my project.  Thank you again for taking the time to respond.  Now for some more details.
 
I will be using 8.2.1 Full Development System.
 
One consideration that needs to be mentioned is that multiple client PCs need to beable to connect to and get the Global Channel information from the server at the same time, not exactly the same time but within the lab PC 1 and PC 2 could be doing two different tests at the same time and would need to get information from the server.  I keep seeing that the VI server is a popular option for tackling this problem,l however I do not have much experience using this feature.  If anyone has any documentation or books that they could point me to in regards to the vi server it would be very much appreciated.
 
I look forward to seeing more responses.
Thank You,
Steve
0 Kudos
Message 7 of 11
(3,863 Views)

Hi Steve,

I'll let the NI guys tell you how to go about using the VI server across the network.

Once you figure that out, I'd probably implement this scheme by serving an Action Engine that was tailored to your requirements since they will help you avoid issues with multiple PC trying to fight with each other over the resourse you are sharing.

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 11
(3,857 Views)
Hi Steve,
 
If you would like to learn more about VI server, I would reccommend first looking through our VI server help documents in the LabVIEW help (Help->Search the LabVIEW help).  If you search for "VI Server", you will find many documents that will help you out.  Also, if you look in the example finder (Help->Find Examples), you will find a lot of VI Server examples under the "Programmatically Controlling VIs" heading.
 
Regards,
Justin D
0 Kudos
Message 9 of 11
(3,838 Views)
Well here is how I plan to attack this problem.  If anyone can see a problem that I might have overlooked please jump in.
 
I will first start by manually making every PC have the same exact daqmx configurations (global channels, tasks, scales, calibration).  I will then export the .nce file to a network folder.  I will then place a subvi in each of the main vi's that are used in the lab that will look at the .nce file and if it has changed since the last time it was looked at by that PC then I will have it import daqmx config file into MAX.  When new Global Channels, Tasks, or Calibrations are done the daqmx config file (.nce) will be exported to the network folder giving all of the other PC's an up-to-date config file to work with.
 
An added benift with this method is that I can create, edit, and calibrate my channels on any of the PC's in the lab and export the .nce file to the network folder.  When the DAQ vi's load they will look at the networked .nce file and update there MAX configs if nessacary.  I noticed an MD5 checksum vi in labview 8.2, I'm thinking of playing around with this vi to keep track if the .nce file has been modified or not.  Looking at the date last modified would be easier but I'd still like to mess with the MD5 vi.
 
I have started work on this and will post back with progress or lack there of.
 
Thanks again for all the help.
Steve
0 Kudos
Message 10 of 11
(3,741 Views)