LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulation Help for Presentation

I have been working on a wireless vital sign monitor that takes heart signal, oxygen concentration and temperature signals using sensors and elecrodes. The signals are then filtered and amplified in the range of 0-5 V.
The microcontroller is the next section that is responsible to package the signal, transmit them wireless, receive them wireless and send them serailly using RS232 cable to PC in the format (delimiter1)signal1(delimiter2)sigbal2(delimiter3)signal3.
The labview then finally separates the data, analyses them and displays the results digitally and in waveforms.

That was the initial plan. The microcontroller chip has blown up and I have less than a week to present this project.

I know how to demonstrate my hardware parts separately.

I am however having a hard time to figure out how to demonstrate my VI part.
This is what it does.
In a continous WHILE loop
- Read 27 bits at a time from the serial port.
- Separate the data (delimiter1)signal1(delimiter2)sigbal2(delimiter3)signal3 using Match Pattern into 3 separate signals
- Convert each signal from binary (out of ADC) to voltage(0-5V mapping) to their respective entity(egs. temperature)
- Display the results
- LEDs to switch on if limits go out of range

Any advice on how I can demonstrate my VI as working one. I have tested each part by itself and they work well.
0 Kudos
Message 1 of 18
(4,110 Views)
I do not know the details of the protocol used to talk to your hardware so this idea may not be viable.

I recently devloped an app that needed to share GPS and other data between my app and another comercial app.

In that case, I wired up a special cable that let me listen to the hardware on the receive line and copy the data back out on the transmit line.

If the hardware just blasts out updates at a regular interval, and no handshaking is used, you could add some code to transmit the data you expect to read and use a loop-back plug (transmit wired to receive) and let you application run as normal from there.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 18
(4,103 Views)
If you have two serial ports on your computer, write another LabVIEW program to write out your simulated data on the second serial port in the appropriate format and read it in to the first. I have attached some simulated data with ECG and Pulse Oximetry. I couldn't find any simulated temperature data, but that should be easy to create.
Randall Pursley
0 Kudos
Message 3 of 18
(4,096 Views)
Hey Randall,
Thanks for the response.
Correct me if I am wrong. You suggesting the below algorithm:
- Have a big write buffer with all my data and write to a serial port
- In a while loop
Read only 27 bits at a time
0 Kudos
Message 4 of 18
(4,087 Views)
Hey Randall,
Thanks for the response.
Correct me if I am wrong. You suggesting the below algorithm:
- Have a big write buffer with all my data and write to a serial port
- In a while loop
Read only 27 bits at a time
Message 5 of 18
(4,094 Views)
Hey Randall,
Thanks for the response.
Correct me if I am wrong. You suggesting the below algorithm:

In a big while loop
- Have a big write buffer with all my data and write to a serial port
- In a while loop
Read only 27 bits at a time until all data in write buffer exhausted

Does that sound alright????
Message 6 of 18
(4,094 Views)
I don't know if you were going to use any handshaking for the serial comms or not. From your last message I assume that you are not.

You should set up the send as the microcontroller serial port was set up. I am going to assume that you were sampling with the microcontroller at a periodic rate. Set up a while loop to send out data at that same rate. I wouldn't just load it all in a buffer, you want to make it as similar to the microcontroller setup as possible.

For this type of data, the sampling rate should be low enough that you can read the data without overflowing the FIFO.

Be sure to remember to use a null modem cable to connect the two serial ports. This cable switches the serial send and receive lines so that one serial port send line goes to the other ports recieve line and vise versa.

Good luck
Randall Pursley
0 Kudos
Message 7 of 18
(4,079 Views)
Hey Randall
If you recall, the attached file was one of the issues you helped me with.

Could you please advice me how exactly did you create the object in the vi "Simulated Signal".

I am trying to create a similar object of with ONLY 10 elements and want to enter in 10 values that will stay as efaults whenever i open the vi again and want to continously plot that on a waveform one after another and start the whole thing again just like the current vi does.


Thanks a lot.
0 Kudos
Message 8 of 18
(4,042 Views)
I read in a data file and created and graph indicator to display the data. I then disconnected the graph indicator from the read spreadsheet file vi and then clicked the right hand button and created a constant. This creates a constant populated by the data shown in the indicator. I'll attach a data file.
Randall Pursley
0 Kudos
Message 9 of 18
(4,036 Views)
Hey Randall
Thanks for your reply once again. I tried to create a simulated constant using the method advised by you but I can only make a constant of 1 column.

This is what I want to achieve. I have a .txt file with data in it. The data is in the form:

data1 data2 data3
0.0520833 95 85
0.598958 95 85
1.41591 95 86 and so on.

I want to be able to read one line at a time from this data, separate the 3 datas using the vi I have attached and get 3 distinct digital separate readings and after the last row, start again at the beginning of file.

I tried to achieve this by creating a simulated constant as I though that would be a good approach but that did not work for me. Can you advice.

Thanks again for your help. I really appreciate it.

NB: I happen to have a presentation about my project tomorrow evening and I was wondering if I can mention you in my AKNOWLEDGEMENT section of the presentation.
Message 10 of 18
(3,940 Views)