Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Change counter filter period on USB-6251 or cDAQ-9172

I am looking to decode a serial stream of Manchester coded data. The data comes in at one of two speeds and has a unique fixed pulse to indicate the start of the data, speeds are 200kHz or 2 MHz in case that helps.

 

I would like to use a counter with a single pulse out to trigger data capture. My idea was to use a counter with a digital filter on the trigger and set the filter to my start pulse width. Problem is I only have a choice of 3 pulse widths with the filter and none of them are what I need. I tried wiring up the Start:Digital Edge:Digital Filter:Timebase:Source Property but that is not supported.

 

Am I looking at this all wrong? Someone has to have done this before, any ideas on how to detect the start of the data in the stream?

 

Thanks in advance! 

 

0 Kudos
Message 1 of 5
(2,983 Views)

Hi Tom,

 

You are correct that the USB-6251 only has three options for filter settings, and that using that property node is not supported. The KnowledgeBase article titled "Digital Filtering with M Series and CompactDAQ" contains further information and explains how you can use the digital filtering since it is only supported on counter inputs. This involves creating a counter input task and setting the filter, then using this counter input line as the trigger for your other measurement task. However, even using this method, you must select one of the three supported filter settings (as opposed to a 660x device which contains different filter settings and even allows a user to provide their own source for the filter clock signal).

 

I am wondering if you could provide slightly more information about the pulse width you are trying to detect and trigger off of. Is it possible that one of the filter settings is short enough to pass this pulse but long enough to block the rest? Also, will you know which speed you are measuring and be able to set the filter accordingly, or does the filter need to work with both pulses? Having a better idea of what actual values we need to detect may help in finding a solution for your application. Thanks!

Daniel S.
National Instruments
0 Kudos
Message 2 of 5
(2,960 Views)

Hi Daniel,

 

Thanks for the response and the tip on the 660X counters. I didn't see a USB of cDAQ version in the product page and my PXI chassis won't arrive until next years budget starts in January Smiley Sad.

 

I have 2 serial data streams I would like to decode. They are identical except one has a 200 kHz bit rate and one is 2 MHz. It is manchester coded data and is produced by an old National Semi DP8342. Attached is what the bit stream looks like and some time periods. When no data is being sent the stream is a square wave with a 5 us period. When data transmission starts there is a 3.25 us high pulse follows by 5 cycles of the 5 us square wave, an 8.125 us low, an 8.125 us high, a sync bit and then data. Data packets are up to 128 bits and transmitted at up to 500 per second. The 2 MHz is the same but times are all 1/10 as long and the rate is 5000 per second.

 

I would like to be able to detect the 3.25 us start bit or the 8.125 us code violation to create my trigger to start data capture. My first impression was to filter the input to a single pulse generator for a 3 us pulse and use that pulse as a trigger. Since I only have 2 counters in each of my devices I am now planning on using them both, one to monitor the stream for the pulse to trigger on and one to do the actual capture. I spent some time with the manuals for both devices and the M series manual and it looks like I can do this with a counter, I just can't figure out how at the speed I need.

 

Thanks in advance! Smiley Happy

 

Tom

0 Kudos
Message 3 of 5
(2,953 Views)

Hi Tom,

 

Since the counter filtering does not seem valid for your application, I would agree with the idea of utilizing the two lines; this way, you would have a counter to monitor the line with a buffered period measurement to keep track of when the "code violation" or start bit occurs. If you can correlate this counter measurement with your line which is performing the capture (presumably a correlated digital input line), you can process the data in software and find the valid segments of data to decode. However, with this method, you will be acquiring very large amounts of data and processing it all in software will be required. Unfortunately, it may also be quite a challenge to implement a method for measuring and decoding the 2 MHz stream with one of the USB devices, as your digital input sample clock will be limited to a maximum of 1 MHz. Best regards,

Daniel S.
National Instruments
0 Kudos
Message 4 of 5
(2,931 Views)

Hi Daniel,

 

That is the answer I came up with also. I think I'll do the conversion in hardware for now and use LabView to process the data.

 

Thanks for the input! Smiley Happy

 

Tom

0 Kudos
Message 5 of 5
(2,890 Views)