LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help With Control Scheme

Hi, Im just starting to use LabView to automate a system for work.

I need to control DI/DOs AI/AOs a Kiethley 6485 and an Atomlab 300. The main problem Im having is trying to access the readings from the Kiethley in the AO structure. The Keithley will be used to determine the initial voltage of the AO. If any one can tell me any easy way to do this I would appreciate it!!

I left the wires disconnected where I would like the value to go.

Also this is my first LV program so any other advise or help in general would be appreciated!! thanks!!

0 Kudos
Message 1 of 22
(3,078 Views)

To understand your VI correctly, the readings from the Kiethley come out in the event structure in the case "Timeout"? And the "AO" is the while loop that has the "Elapsed Time4" VI? That's my guess because it has unwired terminals.

 

Do you want to have the Keithley's measurement used only once, or constantly?

 

If you want it read constantly, it seems like what you're trying to do is explained by a concept called Producer-Consumer Loops. One loop produces data while the other reads it in, simultaneously. Here's a link to explain: http://zone.ni.com/devzone/cda/tut/p/id/3023

And here is an example that uses producer-consumer loops in two forms: https://decibel.ni.com/content/docs/DOC-2239

Basically, you can either use local variables or queues to pass the data across loops. A queue is recommended because it prevents memory leaks and race conditions, and it maintains a sense of data flow.

 

If you want it read just once so you can initialize your AO voltage, then I imagine you would want to have it run before the other loop starts? In that case, you can just wire the data out and bring it in to your AO loop.

Ravi A.
National Instruments | Applications Engineer
Message 2 of 22
(3,040 Views)

Thanks!! You pointed me in the direction I needed and I got that working like I wanted.

 

I do have one more question. I have talked with tech support at both NI and Biodex, but neither can seem to figure out how to read from an Atomlab300 Dose Calibrator. I have tried initilizing it with VISA and using a read function and just about everything else I can think of, but no luck... It keeps timing out on the read function... (I have set the timeout manually to 30+ seconds with no better results.) I don't know if there's something special I need to do to read from it, but I havent been able to find anything (examples or otherwise) about someone trying to use labview with an Atomlab.

0 Kudos
Message 3 of 22
(3,013 Views)

That device seems rather obscure so I doubt there are any pre-written instrument drivers available.  This means you will have to write your own if you want to control it.  Read its manual to find out its communication protocols, set-up a VISA session, try simple commands like "Identify" (*IDN?) to verify basic comm.  Then, expand your command set with what functions you need in your program.  It's not trivial, Smiley Sad but not impossible either. Smiley Happy

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 22
(3,006 Views)

Ya, I have tried that... It's definitely functioning, I have the correct port selected, and I can access it with another program (non-Labview)... It seems like it should be relatively easy to get some response from it, but its like nothing is coming back... s.png

0 Kudos
Message 5 of 22
(3,001 Views)

If you're using a version of Windows on which PortMon runs (http://technet.microsoft.com/en-us/sysinternals/bb896644),

you can monitor the serial port for activity while the other non-LabVIEW program runs.

0 Kudos
Message 6 of 22
(2,992 Views)

Just to clarify, what I meant by the other program is that i have something that can read from the atomlab to verify that it can comunicate with the computer. I don't have this program running (or need to have it running) once I start using labview.

0 Kudos
Message 7 of 22
(2,982 Views)

Try putting a wait.vi (1000mSec) in between your VISA write and read.  This shouldn't be required if everything is configured correctly but it may get your communication started.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 8 of 22
(2,976 Views)
PortMon is a separate app that runs separate from LabVIEW or your other app. It shows all serial port traffic.
0 Kudos
Message 9 of 22
(2,966 Views)

What other program have you gotten it to work with? What kind of protocols or communication does that involve? Maybe we can troubleshoot based on that information.

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 10 of 22
(2,956 Views)