02-20-2009 11:52 AM
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
02-20-2009 11:44 PM
02-21-2009 01:37 AM
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
02-21-2009 02:34 AM
Hi friends
Send me the more information of your problem.
Joseph
02-23-2009 02:02 PM
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
02-24-2009 04:32 AM
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
02-24-2009 10:25 AM - edited 02-24-2009 10:25 AM
This is an example using a loop and your data. If we can get more real data, can improve it.
Cheers
Alipio
02-24-2009 12:46 PM
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
02-24-2009 04:36 PM
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
02-25-2009 04:23 AM
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