Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 8 Legacy DAQ - Counters, Upgrade to DAQmx 2015, PXI-6608

Solved!
Go to solution

I made up an example to work from.  It's made by combining and slightly modifying a few different shipping examples.  It ran just fine on an X-series board with 4 counters.  I'm not sure the 660x board supports configurable A/B source terminals for an Up/Down encoder.  If not, just specify whatever the default PFI pins need to be instead of what I used.

 

I have a master clock at 100 hz to simulate the chopper wheel.  Two counters are configured to generate 5 msec period retriggerable single pulses.  They have opposite trigger polarity.  Their outputs cause a 4th counter to count up and down as they pulse.  If all is working well, this count should simply dither back and forth between adjacent counts.

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 31 of 37
(675 Views)

Thanks very much!

 

Yes when converting from Legacy to DAQmx - the old code was using Continuous set-up, so I think carried over.  I will compare and respond.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 32 of 37
(670 Views)

Yep - the original DAQmx code was calling the NI Timing VI with Continuous Set and I wasn't calling retriggerable property - translating from the old Legcay Help File descriptions is rough.

 

I will make the changes and see if it works.  If Initial Delay works and we can specify the High Period with a short time for the low then this will be great.


Thank you,

Ryan

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 33 of 37
(669 Views)

Ok - setting up the tasks without using the DAQmx Timing - Continuous  solved the double width issue!

We got mostly good behavior from the system, see image 0461

Until - NOISE! See image 0462 and the retrigger would happen too often on one or the other channel, but at least the delays were being applied at the front and the edges were mostly correct.

 

To me this seems like noise on the line (you can see a difference in the Yellow chopper wheel signal) is the culprit now.

 

BUT!  You can add a Digital debounce Filter built into the PFI Lines of the Counter.  Thus for the Start Trigger (Chopper Wheel) we can add Start.DigEdge.DigFilter.Enable and Start.DigEdge.DigFilter.MinPulseWidth

 

Hoping this cleans up the behavior seen in 0462 image.  Waiting to hear back.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 34 of 37
(644 Views)

Seems like using the Digital Filters on the Trigger lines cleaned it all up and with the delay and off time set to the same - all but the very first pulse are using the low time only as the offset from the front edge trigger.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 35 of 37
(626 Views)

The last screenshot looked like it might be running with the 0.5/4.5 msec pulse params.  If it'd be better for the leading edges of your pulses to be closer in timing to the original chopper wheel triggering edge, the 0.0001 / 4.9999 msec params I suggested should work fine too.  I got the idea that you were experimenting with the longer idle time & initial delay of 0.5 msec mainly to try to troubleshoot the original problem.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 36 of 37
(621 Views)

No, the delay after the trigger edges is desired.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 37 of 37
(619 Views)