LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6009 digital input change detection

Hi,

  I am trying to acquire digital signals from an ni usb-6009 device using daqmx on labview 8.0. I need to write the signals from a port of the device to an output file only when there is a change in the signals and I am not able to do this successfully. I created a digital task in MAX and was able to select acquisition mode as '1 sample (On Demand) ' only. Any other selection for acquisition mode would result in error 200077 with the following message -

 

Measurements: Requested value is not a supported value for this property.

Property: SampTimingType
You Have Requested: Sample Clock
You Can Select: On Demand

 

I selected '1 Sample (On Demand)' acquisition mode and was able to see the channel values on running it in MAX as I rotated a device connected to the usb-6009 device. As expected the hex values on MAX were showing up as FF,7F,3F,BF and this pattern was repeated everytime I provided the input by rotating the device.

 

Next, I created a simple vi to use the digital task I setup on MAX. I want to be able to record the signals only when there is a change in the digital pattern from the channels.That is when there is atransition from FF to 7F to 3F and so on, the vi should write to an output file and if no change happens, it should not write to file. To do this, I explored the Timing vi and tried using the 'Change detection' mode, but that produced the same error as above. 

 

Can anyone please suggest a way to accomplish what I am trying to do ? Any guidance will be a hugely appreciated.

 

Thanks

~Sej

0 Kudos
Message 1 of 2
(2,717 Views)

All of that effort with sample rates, timing, change detection, etc ciuld have been avoided if you had read the specs. As you finally found out, the device only supports sftware timed i/o and no change detection. You wll have to do your change detection in software this is done with a shift register/feedback loop.

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