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.
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.
03-25-2010 03:50 AM
Hello everybody!
In my sequencer I used a basic VI to control a device. This basic VI has 100 subVI's, most of them use some shift register and clusters for handling data.
Now I have to use simultaneously 2 devices of the same type (so I'm afraid that is not a good idea to use same subVI's for both devices because I can get wrong results).
I need two different names for my devices to control them separately via GPIB.
So I want to duplicate this basic VI control and his subVI's using new names (old name+index2 e.g. read.vi=>becomes read2vi). Of course the new duplicated VI has to use the indexed subVI's.
The solution I used in the past is to open the basic VI save it using new name...... and then...... repeat this operation for each subVI. This takes a lot of time and each time when I change somethings in the VI, I have to change the same in the duplicate VI. Some times other persons makese the changes and is very difficult to verify if the changes are also done in the duplicate VI.
Can I do this programatically?
Or there is another way to solve my problem?
Thank you!
03-25-2010 04:28 AM
Hi Nicku,
and when you get a 3rd device you create a 3rd copy of the whole hierarchy to control that device too?
Instead you could:
- use VI templates instead
- make an array of measurement data and use your VIs in an autoindexing FOR loop
- separate data aquisition from data analysis to ease point 2
03-25-2010 05:16 AM
Have a look at the OpenG stuff. With he OpenG builder you can create a developement distribution of your BasicVI (containing all SubVIs) and namespace it, e.g. postfix 2. There is also a vi Unmangle Names and Mangle Names to write your own code to do so.
Felix
03-27-2010 03:48 PM
Thanks GerdW but how to use VI Templates with 100 subVIs?
Felix Thank you for your replay but I do not have enough time to learn new things.
Nicu
03-27-2010 04:45 PM
Nicku wrote:
Felix Thank you for your replay but I do not have enough time to learn new things.
Nicu
HUH?! Actually, felix is dead on- While I avoid the openG functions I am aware of what they have. And Felix put you right on the tool that will do what you asked.
Of course, if you haven't the time to learn new things why did you post?
03-27-2010 07:38 PM
Thinking that you need VIs of different names to control two different GPIB instruments is just plain wrong thinking. Each instrument is addressed separately. You can never get results from one when you expect results from another. GPIB just does not work that way. In most cases, you can't even simultaneously read or write to two different instruments.
Forget about renaming all of those VIs and worry about something else.
03-29-2010 05:12 PM - edited 03-29-2010 05:14 PM
07-03-2018 12:24 AM
Dear ,
Do your solve your questions? can you explain for me ? thanks again.
07-03-2018 12:37 AM
07-03-2018 12:56 AM