LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Coded Analog SIgnal

Hello,

 

I am relatively new to LabVIEW.  I am  working with a device which sends out an analog signal (4-20mA) that is time coded with 6 pulses.  I need to program LabVIEW to read the values of the 6 pulses, or really 5 because the first pulse is an identifier, see the attached pdf file.

 

The signal starts with a 20mA signal for 2 sec; this is the identifier signal.  There is a pause for 2 sec and then the first of five signals, which are transmitted for 2 sec each with a 2 sec pause.  At the end of the sixth signal there is a 30 sec pause (4mA).  The identifier pulse will always be 20mA but the five other signals can vary in amplitude.  I need assistance in reading these five signals; from here I can scale the mA value to what I want.

 

I am working with LabVIEW 8.2 and I am using an ENET 9219 module.  I can acquire the signal graph it, display the value etc and I can also trigger off the first pulse, but the rest is proving to be difficult.

 

Thanks for your help!

Brian

0 Kudos
Message 1 of 19
(4,104 Views)
I would use Get Waveform Subset from the Waveform palette to break the incoming analog waveform down into different time slices.  Then look at the time slices for their respective analog values.
0 Kudos
Message 2 of 19
(4,073 Views)

It looks quite interesting. Can you post a file with data in binary format I16 or  and digitization speed?. I guess you need position and amplitude of pulses, ok?

 

Cheers

Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 3 of 19
(4,066 Views)

Hi friends

 

Send me the more information of your problem.

 

Joseph

 

0 Kudos
Message 4 of 19
(4,059 Views)

To get an idea of what the signal values are take a look at the spreadsheet and the short code to generate the sample data.  At the end of the last pause (30Sec) the signal repeats again, starting with the 20mA identifier pulse.  This devise is a fluid monitoring sensor for hydraulic oil.  The idea is to have this continuously read data and display all 5 signal values.  Display does not need to be instant, as with temperature and or pressure readings.

 

I tried to use the Get Waveform Subset, but experienced an error.  I was trying, as a simple test, to see if I could manually trigger the start of the recording when the 20mA pulse came up.  When I trigger how do I get the subset to start from 0 on the time line?  If I could start from 0 every time I could read from the approporate time (t) to read the value at y.

 Thanks.Brian

 

Download All
0 Kudos
Message 5 of 19
(4,006 Views)

Hello.

 

 It looks like you are taking 5 samples per second. Now, can you take samples for about 5 minutes or so to make sure the trigger pulse is a pulse?. In your las post, the trigger seems to be only half of its time and no rise .  Also, try to use the real signa. If there is noise, some filterin will help.

 

 

Cheers

Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 6 of 19
(3,988 Views)

This is an example using a loop and your data. If we can get more real data, can improve it.

 

Cheers

Alipio

Mensaje editado por alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 7 of 19
(3,967 Views)

Attached is a copy of some recorded data for an extended period of time.  The sequence can be seen as real measured numbers and it is repetitive.  The identifier “pulse” is the same length in time and has amplitude which is consistent in all measurements (19.8mA).  There is of course a sample point capturing the rise and fall if each signal.

 

Thanks,

Brian

0 Kudos
Message 8 of 19
(3,950 Views)

The code looks great Alipio!  The test run looks like what I am attempting to do.  I am in attempts to wire my data from the DAQ assistant to this code.  Hopefuly this will work for me.

 

Thanks,

Brian

0 Kudos
Message 9 of 19
(3,935 Views)

Hi Brian.

This is an example using yout real data . First block is not detected because de pulse must be full to be detected. Tis method is more robust than level detecting.

Now, this is a consumer/producer structure. You can code the producer DAQ.

Results are average 3 samples in the middle of every pulse.

 

Bear in mind that this is a quick example. The real code needs more work

 

Cheers

Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 10 of 19
(3,919 Views)