LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog input multiple signals to case structure?

Hello,

 

I am using LabVIEW 2009 with a PCI 6024E PCI card. I want to monitor two devices that send one single square TTL signal as an event. So, one event is my "Start" and the other is the "Stop". During that period I use a timed loop to perform a couple of steps throug the Digital Outputs. I don't know exactly how long the experiment takes, but the timed loop is fixed in time and about 20 seconds.

 

What I am trying to do is that when the experiments "Stops" the program starts monitoring again for a "Start" signal and so on. I started testing only for the "Start" through the Analong Input 0, in a while loop and connect it to a case structure so that when AI0 reads a high TTL level (very short) it changes the structure to TRUE and when the AI1 reads a high TTL level the case switches to FALSE. While in false, the timed loop should not be executed.

 

Attached is the vi I got working but only when checking the "Start" signal. I know it might be horrible, but it's what I got working! Yes, i am quite new with LabView. Sorry if this was posted somewhere else, I couldn't fine it. I am not familiar with DAQmx and I did everything with the DAQ Assisstant.

 

Thanks in advance helping!

Message 1 of 2
(2,304 Views)

Hello Icarus7,

 

Let me ask a few questions.  First, let me make sure that I understand your application.  You want to control a digital output using two external "Start" and "Stop" signals.  Is this correct?  Second, you mention monitoring analog signals in your post, but I noticed that the DAQ Assistants in the code you posted are all digital.  Did you mean for them to monitor an analog signal?  Third, are you using a real-time system?  Timed loops are intended for use in real-time systems only, so if you are not then you might want to use a different structure.

 

Here are my recommendations.  If you are a new LabVIEW user, then this tutorial might prove useful to explain more about our DAQmx functions and how to program without using the DAQ Assistant.  The best way to implement this might be using start and reference triggers, which requires synchronizing a digital output task with a dummy analog input task.  "Multi-Function-Synch AI-Read Dig Chan.vi" is an example that ships with LabVIEW and can be found in Help >> Find Examples... , then Hardware Input and Output >> DAQmx >> Synchronization >> Multi-Function.  You can modify this example to use digital output and go from there.  Hope this helps!

 

Regards,

Joe S. 

0 Kudos
Message 2 of 2
(2,282 Views)