Jump to content

Processing 1 D array of digital waveform


georgekm

Recommended Posts

Hello,

I am trying to get the frequency of a digital signal. I used the DAQAssistant to collect N samples off a digital line. The outpiut data format is a 1 D array of digital waveform. I cannot connect it to the Signal processing VI since it needs to be in the 'Dynamic data' format. Using the 'Convert to dynamic' Vi does not work either. How do you process a digital signal?

Thx.

Link to comment

Hello,

I'm using a PCI 6221 DAQ Card. I am reading in an encoder signal through one of the digital inputs (PF1). The output is a 1 D arrray of digital waveform and the Signal processing VI won't take it in as an input. Code is attached.

Thanks!

George

QUOTE (Neville D @ Jun 11 2008, 01:12 PM)

What hardware are you using? what is the frequency of interest? Show us your code.

I would use a counter channel to measure frequency. Look at examples for counters.

Neville.

Link to comment

QUOTE (georgekm @ Jun 12 2008, 10:17 AM)

Hello,

I'm using a PCI 6221 DAQ Card. I am reading in an encoder signal through one of the digital inputs (PF1). The output is a 1 D array of digital waveform and the Signal processing VI won't take it in as an input. Code is attached.

Thanks!

George

Apart from a very snazzy icon, you seem to have done little else! :wacko:

Like I said before use a counter for measuring frequency, not a digital line. Look at the examples on counters in LV and search the NI website for "reading counters" or "reading encoders". There is some info there to clean up signals as well as using quadrature encoders.

This is quite critical for a real-world application since, noise is very likely to corrupt your encoder signals, and using these techniques you will count the correct transitions of the encoder pulse (avoid reverse counts), and avoid missing pulses.

As to your specific question: you can use an unbundle node on your digital waveform and that should give you:

* the Y array of digital data

* t0 the start pt

* dt the time between successive pts.

Then you can do whatever processing you want on the array; though I would imagine you just need to count the number of high values (N) and divide by (dt*N), so I don't really see the need for a "signal processing" VI..?

Neville.

Link to comment

Cool thx!

Lemme try what you say. I need to use the encoder signal as a trigger to collect data too. Hope that spossible with a counter.

George

QUOTE (Neville D @ Jun 12 2008, 03:10 PM)

Apart from a very snazzy icon, you seem to have done little else! :wacko:

Like I said before use a counter for measuring frequency, not a digital line. Look at the examples on counters in LV and search the NI website for "reading counters" or "reading encoders". There is some info there to clean up signals as well as using quadrature encoders.

This is quite critical for a real-world application since, noise is very likely to corrupt your encoder signals, and using these techniques you will count the correct transitions of the encoder pulse (avoid reverse counts), and avoid missing pulses.

As to your specific question: you can use an unbundle node on your digital waveform and that should give you:

* the Y array of digital data

* t0 the start pt

* dt the time between successive pts.

Then you can do whatever processing you want on the array; though I would imagine you just need to count the number of high values (N) and divide by (dt*N), so I don't really see the need for a "signal processing" VI..?

Neville.

Link to comment

QUOTE (georgekm @ Jun 16 2008, 08:44 AM)

Cool thx!

Lemme try what you say. I need to use the encoder signal as a trigger to collect data too. Hope thats possible with a counter.

I tried unbunling the waveform output but am running into the same data type compatibility issues. Whats the deal with these waveform outputs? I can't seem to do anything with them... :blink:

George

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...

Important Information

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