Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

1-D array of digital waveform to Waveform DBL

Hi
I previously requested a solution to a problem of being able to measure the pulse width of a digital input coming from a PCI-6111 DAQ. The inputs are coming from an Accelerometer into the digital port on a BNC 2110 board.
 
I receieved a solution but it then brought up another problem. The solution was to use the pulse measurement.vi in the waveform measurement section. But this vi takes in waveform DBL(?) and the DAQ assistant gives out an output of  1-D array of digital waveform so its not possible to connect these two block elements together. How do i connect these two block elements together so i can get a pulse measurement?
 
Thanks again
 
Will
0 Kudos
Message 1 of 13
(4,393 Views)
Hello,
Can you please attach your vi,so that i can correct it send you back

Regards
embedded systems engineer
0 Kudos
Message 2 of 13
(4,386 Views)
Hello,
Can you please attach your vi,so that i can correct it send you back

Regards
embedded systems engineer
0 Kudos
Message 3 of 13
(4,384 Views)
I think this is the vi.
It should have a DAQ assistant with line inputs(2 of them).
a Pulse Measurement vi
and a formulae vi. The forumlae is to calculate the value of acceleration from the accelerometer.
X1 is pulse duration.
X2 is the period.
 
0 Kudos
Message 4 of 13
(4,381 Views)
Have you attached correct vi,
0 Kudos
Message 5 of 13
(4,377 Views)

Sorry, i didnt update the file.

I am not very good with labview but this is the best effort i could get out of it.

As i explained before,

A digital output signal from an accelerometer (ADXL210JE from analog.com) gives out an output and the digital signal in connected to port 0 of the BNC 2110 board. The BNC 2110 board is connected to the PCI 6111 DAQ. Using DAQ assistant to pick these devices up and read the signal from the output, i can get a signal on the indicator. Easy enough.

 

But i have to analyse the signal and all it is at the moment is a line of 1 and 0's. The formulae to calculate it is [(T1/T2) - 0.5)] / 0.04

Where T1 is the duration of the high pulse and T2 is the period duration. T1/T2 = duty cycle.

But i can't connect the data output from the DAQ assistant to any vi which can measure the pulse width and period because of the data type. What can i do about it.

It also seems that i can't connect the pulse measurement vi outputs to the formulae block.

I really need some help!!

Thanks for any help available

 

Will

0 Kudos
Message 6 of 13
(4,361 Views)
I don't have the hardware to really test it and I've never experimented with the digital waveform functions but look at the attached modification. There's an index array function to get the channel you want to analyze and then a couple of search for digital pattern functions. Using first a pattern of 01, then 10, and then 01 again, it returns a relative time that you should be able to use to calculate the parameters. Another way to do it would be to use the function Digital to Boolean array, search for the first true and get the index, search for the next false and get the index, search for the next true and get the index. With the indexes and the dt from the Get Waveform Components, you can also calculate the times.
0 Kudos
Message 7 of 13
(4,359 Views)
Thanx Dennis
I'll give it a shot and tell you what happens
 
Will
0 Kudos
Message 8 of 13
(4,352 Views)

Hi Dennis ,

              The logic was fantastic.yesterday i too worked on that vi.but no good resultsi got.

 

Regards

embedded systems engineer

0 Kudos
Message 9 of 13
(4,347 Views)
Hi Mushu,

In your initial post you said that you are trying to measure the pulse width of a signal coming in from an accelerometer.

If you are trying to measure a pulse width, then the best thing that you can do is to simply use a counter.  In fact, there is an excellent shipping example that shows how to do exactly that:

Meas Pulse Width-Buffered-Cont.vi

(Help > Find Examples > Browse > Hardware Input and Output > DAQmx > Counter Measurements > Period or Pulse Width)

I took a look at the DataSheet for the PCI-6111 that you are using and saw at the bottom right of the first page that the 6111 has software timed DIO, so that means you won't be able to use the Digital Waveform examples that were sent by some other people on this forum.  Granted the VIs work great and the logic is on, but it won't work for this particular board.

The only way that you will be able to read the pulse width on this board is with a counter.  The best way to read a counter is to start with an example.  Once you get the example working, then it should not be hard to implement the rest of the code that you need for your custom application.

Regards,
0 Kudos
Message 10 of 13
(4,327 Views)