LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to modify analog input triggering to digital input triggering in the vi file

Hi everyone,

 

Here is the issue indicated below I am having:

 

I have already established vi file that runs for multi-channel data acquisition and triggering by the help of NI PXIe-6366. Since I need to do some tests using NI USB-6212 using same vi file, the vi file requires modifications on defining analog input channels and corresponded triggering channel. While I am doing these changes, no problem appeared for defining the new analog input channels but I realized that the DAQ device was not accepting the analog signal to use it as a trigger. Then, I decided to change the type of DAQmx Trigger.vi into digital edge reference. Also, I changed the source terminal of the trigger into one of the digital input channel (port1/line0) in USB-6212. Because of the fact that in the previous version of the vi file all channels were used as analog input, I could not find a way without affecting other essential blocks to define related digital input channel for the trigger source in LabVIEW.

 

That is the point I stuck actually. In the vi file front panel, there is a drop-down button that calls the physical channel. And that physical channel only shows the analog input terminals of USB-6212. Therefore, I could not add or select any of digital input channels there.

 

Could you please guide me to overcome this problem? I am attaching the vi file also so that you can check the things easily through it.

 

Thanks.

0 Kudos
Message 1 of 3
(2,433 Views)

Hi,

 

The resources linked below have a lot of helpful information that can help you set an analog trigger. 

NI-DAQmx Data Acquisition Triggering Techniques Using LabVIEW

http://www.ni.com/tutorial/4329/en/

 

NI-DAQmx: Analog Start Trigger to Continuously Acquire Analog Data

http://www.ni.com/example/29834/en/

 

NI-DAQmx: Acquire Analog Input Data Using an Analog Trigger - Multiple Times

http://www.ni.com/example/25151/en/

 

 

Best regards,

Misbah

Applications Engineer

National Instruments

 

0 Kudos
Message 2 of 3
(2,394 Views)

I think this is mostly a problem of terminology.

 

When you configure a digital trigger for an analog input task, you'll need to specify the trigger signal by it's *terminal* name.  It will be something like "/Dev1/PFI8", or whatever the PFI designation is for where you wire in the digital trigger signal.

 

Many terminals on multifunction boards can serve dual purpose.  "Dev1/port1/line0" is the way to refer to the pin when it acts as a *channel* for a digital *task*.  The exact same pin would be referred to as "/Dev1/PFIx" (where x is the correct specific # for your device) when it's being used as some kind of timing-related signal for a task.  In your case, it would be a trigger signal that you physically wire in. 

 

In other situations, PFI pins can also be configured to play many different timing-related roles (sample clocks, trigger signals, output pulses, export of internal timing signals, etc.).

 

Though they have the same color, channel wires and terminal wires are distinct in DAQmx.  If you're wiring a *channel* wire (designated similar to "Dev1/port1/line0") to DAQmx Trigger, there's going to be a coercion dot (and you'll get an error when you try to start the task).  If you right click on the DAQmx Trigger input and create a constant , it will automatically create a *terminal* constant (designated similar to "/Dev1/PFI8") with no coercion dot and no error on start.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 3
(2,391 Views)