Jump to content

Analog triggering not working


Recommended Posts

I have a requirement that I thought would be SIMPLE, but can't get it to work.  I have a 9205 card in a little 9174 cDAQ USB chassis.

My *intended* behavior is to wait (block) at the DAQmx Trigger/Start Analog Edge on, say channel ai1, until I get a falling edge thru, say, -0.050V.  So I have a little vi (that contains 2 parallel loops) that I want to sit & wait for the trigger to be satisifed.  I'm doing "routine" voltage measurements in another AI loop on a different channel.  I want this vi to run separately from my "routine" voltage measurements because I want the app to respond "instantly" to input voltage exceeding a limit to prevent expensive damage to load cells.  I was afraid that if I used either Finite or Continuous sampling to "catch" an excessive voltage, I might miss it while I'm doing something else.  Yes, yes, a cRIO real-time setup would be better for this, but this is a very cost-sensitive task... I just want to "Arm & Forget" this process until it gets triggered, whereupon it fires an event at me.  SO... I'm also reading the same voltage on channel ai0 for regular-ole voltage measurements, and just jumpering them together.  I did this because I read somewhere that you can't use the same channel for multiple DAQ tasks - I *thought* I would need to set up the tasks differently.  {but now that think about it, the setups can be the same...}.

I've set up the DAQmx task the same as shipping examples and lots of posts I've seen.  I'm supplying a nice clean DC voltage to a 9205 card using a high quality HP variable power supply.  Using NI-MAX, I've verified that my 9174 chassis & 9205 are working properly.

THE PROBLEM - When I run it, the vi just sails right through to the end, with no error, and an empty data array out.  No matter WHAT crazy voltage I give the "DAQmx Trigger.vi" (set up for Start Analog Edge), it never waits for the trigger to be satisfied, just breezes on through as if it weren't there.  If I set the Sample Clock for "Finite Samples", the DAQmx Read fails with timeout - makes sense, since the trigger wasn't satisfied.  What could I possibly be doing wrong with such a simple task???????

So my fundamental misunderstanding still vexes me - does the DAQmx Trigger vi not block and wait for the trigger condition to be satisfied, like the instructions state - "Configures the task to start acquiring or generating samples when an analog signal crosses the level you specify"?

I stripped my requirement down to the bare essentials - see the 1st snippet, the 2nd is my actual vi.  Any ideas, anybody?

Analog trigger not working.png

More Arming an Analog Trigger.png

Edited by paulofelora
wrong pictures
Link to post
Share on other sites

I played around with the continuous and finite examples using a 9205 (mine is in a 9178 chassis, but that shouldn't matter), and analog start triggers configured on the same AI as the task's first channel seem to work for RSE continuous measurements, but not differential measurements.  They also seem to work for Differential finite measurement, but trigger off the channel configured, not the differential pair.  Continuous differential measurements exhibit the same behavior in NI's examples as in your code.

A continuous measurement doesn't make much sense for your application, as you are only measuring once after the trigger.

Once you do get triggering working, you may be able to use DAQmx connect terminals to route the AnalogComparisonEvent (you can find this if you enable advanced terminals in the I/O Name Filtering) to another card, which could then be used to drive circuits without any software timing involvement.  If you change to the 9178 or 9179 chassis, one of these terminals could be the BNC connections on the chassis itself.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By javier_r
      VIPM.io now allows you to post LabVIEW Resources, Ideas, and Tools. For example, you could post a link to a video tutorial or blog article about a package. You can also post ideas, like feature requests or new tools. Best of all, package developers are notified when you post your ideas and resources, and you can comment and discuss posts with the community. Take a look at this video to learn more: https://www.vipm.io/posts/664960df-f111-4e13-989a-24be8207182d/

    • By Shuvankar Das
      I want to connect My ccd camera with labview. The details of my system is given bellow. I cannot connect it please help   OS:  WINDOWS 7, 64bit   LabView Run-Time 2013(64-bit) NI-IMAQ 4.8 NI-IMAQdx 4.3   Camera: QICAM Monochrome Cooled (QIC-F-M-12-C) Model QICAM Resolution 1392 x 1040 Sensor 1/2" Sony ICX205 progressive-scan interline CCD Pixel Size 4.65 x 4.65µm Cooling Type Peltier thermoelectric cooling to 25˚C below ambient Digital Output 12 bit Video Output FireWire (IEEE 1394b) Max. Frame Rate 10 fps full resolution @ 12 bits Pixel Scan 20, 10, 5, 2.5MHz Mount Type C-mount optical format  
       
    • By javier_r
      Hello everybody!
      Wondering how many people have tried the new vipm.io site. We have added a ton of features to make it easy to Discover LabVIEW Tools and there are some cool ones coming soon.
      Check it out and let me know what you think 😀
       
      Javier

    • By DigDoug
      CLA_ATM_QMH_PRACTICE.zipHi Folks,
       
      I'm taking the CLA exam in a few weeks and would like some feedback on the solution I put together (attached). A few specific questions:
      Can I dump tags in the VI Documentation of the VI like I did in Error Handler - Console Error.vi and get credit since there are instructions for developers to complete this work? This would be my strategy if I run out of time. 
      Does this seem like a passing solution? Why/why not?
      Where do you think I would lose the most points in this solution?
      Any other feedback on this exam or general strategy tips are greatly appreciated!
       
      Best Regards,
      Aaron
    • By David Akinpelu
      I am implementing a TCP connection between MyRio(client) and Python(server). The goal is to send data from the server to the client, perform some calculations, and send the result to the server. I need to keep changing the data being sent to the client. I noticed the first data works fine and the result returned to the server, but the client could not read subsequent data. I debugged and was able to detect that the error is coming from the first read function is the "Reading values subvi"  but I don't know how to correct it. How do I go about it?
      I have attached the files below.
      Reading Unknown Bytes from TCP.vi Second_client.vi SimpleServer.py
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.