LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting real time ECG data via serial port

Yes,  configure serial port is used with ECG.

 

The try.vi is not really a debugger....  It was the quickest word I came up with when writing the post. 

It is an example that creates random data to generate a waveform.  Or it uses data within an array.  You can "swap" the data with your real data if you sample a full waveform using your serial port.  All you need to do is wire a string control to replace the items in front of the spreadsheet string to array. 

Try.vi was really meant as a learning tool that you can use to "test" your code without having to communicate with the microcontroller. 

 

Have fun,

 

R

0 Kudos
Message 11 of 38
(2,870 Views)

Hi Joe

 

I was just trying the examples you provided and I highly suspect it could be a case of me not knowing how to use it so I'll list down the steps that I took.

 

1. Opened Configure Serial Port.vi and applied the serial port settings. I'm using com 4, baud 4800, 8 bits no parity with no flow control. 

Q: Do I change these settings when the vi is "running" or before clicking "run continuously"?

 

2. I'm getting a "red cross" under the status in the error out message box. The error code: -1073807202 and the error message:  Property Node in VISA Configure Serial Port (Instr).vi->Configure Serial Port.vi->ECG.vi, I'm not sure what this means.

Q: Is this due to improper serial port settings?

 

3. I opened ECG.vi and without changing anything I ran it and have an identical situation with the error code and message. I noticed by running ECG.vi, Configure Serial Port.vi also runs automatically is that correct?

 

Needless to say no data is transmitted. I appreciate the help you've provided so far but I hope you could clarify my steps.

 

Thanks again

 

Matt.
0 Kudos
Message 12 of 38
(2,852 Views)

Oops... my fault. 

 

I forgot to place the serial configuration parameters on the front panel of the ECG.vi.  Am alternative would have been to set the parameters in Configure Serial Port and then set all values as default..  But you would not have known that.  😮  Sorry..

 

Attached is a modified ECG.vi which includes the Serial Port configurations on the Frontl Panel.  You do not need to open Configure Serial Port, as it is all within ECG.vi.

 

R

 

0 Kudos
Message 13 of 38
(2,846 Views)

Hi Joe

 

Thanks for the update. I tried the new file but am still getting the same error code. Just a quick question, do I need additional hardware from National Instruments to interface my ECG device to my PC's serial port? Right now i'm just using a DB9 connector cable with pins 2(RX), 3(TX) and 5(GND) as my signal pins.

 

Oh and from the "VISA resource name" drop down list, there is only COM1 displayed eventhough I refreshed it. I'm using COM4, can I just edit the text in the box?

 

Thanks

 

Matt

 

 

0 Kudos
Message 14 of 38
(2,839 Views)

Hi Matt,

 

Are you able to communicate with the ECG device using another program such as HyperTerminal (or Procomm or others)?

If so, then the same settings should apply to the VI's serial port configurations.  If you have a serial port on your Laptop and the DB9 cable, then that is all you need.

 

The serial port may show up as some other alias in the selection.  If you have MAX (Measurment & Automation Explorer) installed, try to manually communicate with the ECG device.  MAX should provide a list of available serial ports.  Look under Devices & Interfaces. 

 

You can't simply enter COM4.  Somehow, the alias is not set.  Is there something like ASRL1 listed?

 

R

0 Kudos
Message 15 of 38
(2,829 Views)

Hi Joe

 

Yes i'm able to use Hyperterminal to recieve data from my ECG device. From the "VISA resource name" drop down box only COM1 is available. I applied the serial port settings exactly as I would for communicating with Hyperterminal. However the only difference is the stop bit within the ECG.vi which is listed as 1.0 instead of 1...i'm guessing this has no difference. Any ideas?

 

Regards

Matt

0 Kudos
Message 16 of 38
(2,792 Views)
If you are getting error -1073807202, then that means you do not have NI-VISA installed or it is installed incorrectly. Until you can fix that problem and see your com port in MAX, you are just wasting your time.
0 Kudos
Message 17 of 38
(2,788 Views)

Hi Dennis

 

May I know how I can install the NI-VISA or re-install it? 

 

Regards

Matt

0 Kudos
Message 18 of 38
(2,780 Views)

It should be part of your installation CD's.

 

It's been a while since I installed LV, but I would guess that it is part of the Drivers CD.  I think you can install it seperately by finding it on the CD.  Otherwise, you can go through the LV installation process and simply select to add NI-VISA...  Although I have never tried it this way, I typically install everything... 😉

 

R

0 Kudos
Message 19 of 38
(2,772 Views)

You can read the discussion on the topic of missing NI-VISA in this thread

 

You can download the NI-VISA here (version 4.3)  This will be less confusing than searching for it on the installation CD..

 

Message Edited by JoeLabView on 10-07-2008 11:20 AM
0 Kudos
Message 20 of 38
(2,769 Views)