LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple VISA Operations in one VI

Hallo!
 
Im a new programmer currently trying to create a VI for data acquisition using the Agilent 34970A DAQ unit. At the moment im trying to merge the current, voltage and temperature acquisition VIs into one VI. I have manually added the separate VIs together. However when I try to take readings, ie, run the VI, I seem to get VISA write errors from each of my separatre acquisition VIs. The error is the same in each, it is an error out message saying it is a VISA write error in my program. Asking LabVIEW to explain comes up with this message:
 
Error -1073807343 occurred at VISA Write in Merge 1.0s.vi
Possible reason(s):
VISA:  (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
 
Any help is much appreciated. Thanks very much!
0 Kudos
Message 1 of 10
(5,901 Views)

Post your code

Its easier for us to help.

NB save front panel values as theý are in your setup

chow

xseadog

 

0 Kudos
Message 2 of 10
(5,895 Views)
Hallo again!
 
This time I attached the VI im having a problem with.. =D
Help!
 
0 Kudos
Message 3 of 10
(5,881 Views)
Hi again
have had brief look at your vi:
While Loop A (Temperature loop):
You have not initialise Instrument, suggest  you establish contact with Logger
before the loop.

While loop B (Voltage loop):
Same problem !!

While loopC (Current Loop):
Ditto

You are attempting to send 3 different commands with sub instructions included
to the instrument at the same time !!

Compounding the situation by trying to write to the same file simultantously.

My suggestion is to first focus on just one loop-remove the other two.
Once you have achieved the goal , writing to instrument recieving response
logging to file then move to next level.



Read up  Labviews Measurement Manual  Chapters 5 to 9 are most appropiate

Chow
xseadog
Message 4 of 10
(5,871 Views)
Hm... Not sure what you meant about the initializing instrument since the separate VIs work. Will try the single loop and checking up the manual though. Thanks!
0 Kudos
Message 5 of 10
(5,861 Views)
WIth regard to instruments:
when you manually setup instrument, it is possible to save setup parameters so that if some one else
uses the instrument you can quickly return to your setup via recall menu.
It is essential that all parameters are known before analysising measured data!!
Just think if some one had adjusted  the sweep rate or voltage resolution ?

By reseting instrument before use, you will know it 'default state'
All parameters will be reset to factory conditions else user conditions.

If you check out any LV instrument drivers you will find in the examples they provide that they 'always
start with an initialisation/ reset routine.

Fail to observe this practise leads to time consuming debugging when you can't repeat the operation
againn and again !!!

chow
xseadog

Message 6 of 10
(5,850 Views)
Hi again

*To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.<br>In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).*


chow
xseadog
Message 7 of 10
(5,847 Views)
Hi again
IF you follow following link
http://www.ni.com/events/tutorials/campus.htm
you should find appropiate tutorial to suit your application.

Chow chow
xseadog
Message 8 of 10
(5,845 Views)
Hallo!
 
Looked through the tutorials page.. The list is v long..
 
Did what you suggested and used only one loop.. but added a sequence structure INSIDE the loop so the three VIs run concurrently.
This seems to work fine, but somehow the sequence structure in the while loop generates some run/stop problems.
 
When stop is clicked (the while loop stop) for the first time the program keeps running. When the stop button is clicked a second time the program stops. However, when "run" again, the program seems to just execute the REMAINDER VIs in the sequence structure which was aborted by the previous "stop", and then the program automatically stops. Running it a second time works fine, till another "stop" phase.

Anyway will try to figure this out myself for now. Thanks for all the tips xseadog!
0 Kudos
Message 9 of 10
(5,833 Views)
Suggest you use the high light execution button
It will enable you see how your code executes.

Remember with dataflow that all connections to a 'sub vi'
 must be updated before the  vi instruction executes.

chow xseadog
0 Kudos
Message 10 of 10
(5,816 Views)