"Example on reading combined signals from a serial port and separating them for display purposes". I am a beginner in Labview and would appreciate if anyone help with that
I am working on a wireless vital sign monitor. I have 3 signals; heart rate and temperature. I filter and amplify the signals before converting them into digital form. I then pass them via MAX232 before passing them to RS232 serial cable.
I am therefore working on a program to receive the combined signal and separate them.
I have come across serial read and write examples on ni.com but am looking for one where I can actually separate combined signals and display them separately.
Reading the serial port will give you a string. How you divide the channels depends on how the data was formatted before it was sent over the serial channel.
If you are designing the instrument, as it seems from your query, then you can set up any form you wish. If your data is always floating point numeric, you could use space or tab characters to separate data words. You could use and XML format. If the instrument is provided by a vendor, contact them for the protocol.
If tabs are used between words and returns between sets of readings, the resutlant string can be interpretted by the Spreadsheet String to Array function in LV.
Things to avoid are characters often used by serial communications systems as control characters. Carraige returns are
often used as command terminators by serial protocols, but may also be used by the port.
Lynn
Similar Messages
-
How to get a signal from the serial port to start a labview program?
I need to synchronize the data obtained from a program (which is not in Labview)with the data collected with Labview on a different computer. I can send some data strings to the serial port of the computer running the Labview program when the other program starts. However, I need to be able to read the trigger in my Labview program. Do you know what I should do? Thanks.
If you don't have any other programs listening on the COM port, you need to let a LV program run BEFORE the signal comes, otherwise you won't be able to read it. You can have the program wait in a slow timed loop so that it doesn't use up too much CPU time, and when the required "trigger" comes, to move into the main part of the program.
You basically need a while loop waiting for a certain string in the serial buffer. Once the string is found the while loop is exited, and the data acqquisition or whatever else you require from the progam can be performed.
In the example attached the program wait for ANY text to be sent to the COM port. Please note that you need to configure the VISA resource before using it. Once there is something at the COM port, the loop will exit and the rest of the program will be executed.
Hope this helps
Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Attachments:
Wait for serisl message.vi 17 KB -
How can I read the voltage from a serial port
I am fairly new to LabView and I am having trouble figuring out how to read the DC voltage coming out of an RF Power Supply through a serial port so that I can monitor the voltage every few seconds. In order to do this do I need to purchase a DAQ card or anything like that?
You would not need a DAQ card to read data over the serial port. You would, however, need a serial port. That may sound sarcastic, but it's not, since many manufacturers are ditching serial ports on computers. If you don't have a serial port then you would need to get something like a USB<->serial adapter or a serial port card that you plug into an expansion slot in your computer.
Assuming you've got that then you need to find the command set for the RF Power Supply, and write drivers for it so you can send the command to read the voltage, and then read the resposen. I would suggest looking in the Instrument Driver Network to see if a driver for your supply has already been written. -
I read the data without problems, and I see them using Waveform graph, the problem is that I want to see the real time stamps, but in the graph appears 2:00:00,000 and 01/01/04, so the date and the time is wrong !!
Can I change this?
I am thinking that the problem is that I have to adquire the data and the time stamps ( using Get date/time) and after, I have to represent both!!!
Thanks!!!Hello,
As you probably know a waveform is made of a beginning time (t0), a time difference between each value (dt) and an array of values (Y). Your problem is probably that you don't initialize t0. Use the Vi 'Waveform->Build a waveform' to initialize the time of the waveform.
Hope this helps !
Julien -
Reading a whole frame from the serial port
I have posted before about my attempts to use the serial port (http://forums.ni.com/ni/board/message?board.id=170&thread.id=387410).
Anyway, I want to connect an external device through using VISA. It uses a protocol that exchanges frames. My main program is a series of while loops going through the different echanges, it sends one frame, waits for the proper response, sends the frame again etc.
My problem lies in reading the frames. I'd like to read from the serial port until I get an EOF character, then parse the frame, etc. for every cycle of send/check. This doesn't work. I've managed to get one character from the port, thereby confirming that my reading function does actually read. Then I tried to put it into a loop which resulted in it not returning any characters at all.
Attachments:
AssReq.GIF 5 KB
GetFrame.vi 14 KB
readVISA.vi 13 KBAttachments:
SerialPortControl_2.vi 24 KB -
I've got the labview vi written to read my IMU data from a serial port in COM1 and it displays onto the table on the front panel. I'm having trouble getting this data onto an excel spreadsheet. Any ideas? Right now my data will collect one reading instead of continuously reading my IMU which displays data in a continuous stream.
Thanks
Attachments:
Read_IMU_Drew.vi 21 KBHi
Your vi is in 2009 version, which i am unable to open in 8.6
However, if you want your data to be saved in excel sheet, here is the VI
Somil Gautam
Think Weird
Attachments:
save to excel.vi 12 KB -
Read in signals from a usb 6212 in more then one computer
I have a NI-USB 6212 to read in signals from a industrial proces in the computer. This computer has also a touchscreen so workers can select a reason why the proces is stoped. Now the problem is that this has to happen at two places so with a another compter and touchscreen plus on a another computer has to monitor on a big screen al the procesvariabels. I want to do this al with LABview. What is the best way to do this?
Kind regards,
Solved!
Go to Solution.fille,
if the signals that are acquired by the 6212 are not too fast, you could write the acquired data to network published shared variables. If your second PC has a network connection to the first one, you will be able to access these shared variables there.
Kind regards,
Jochen Klier
National Instruments -
How to read and write from the serial port using java
can anyone tel me how to capture data from a serial port and display on the screen and also store it in a database.
Java Comm API, JDBC
-
MEASURING FORCE ON BALANCE USING AN ELECTRONIC BALANCE FROM THE SERIAL PORT
Hi,
I am trying to measure FORCE using an electronic BALANCE from the serial port. My measurements are strange! The BALANCE sometimes give ZERO reading! Is it because of the sample rate, baud rate etc? I have attached the readings concerned.
Attachments:
databalance.doc 144 KBI think your problem is due to the way you read the weight :
1/ask the balance to send the data
2/oversee the byte number on the serial port until it is constant
3/read the bytes received
4/convert to number
During step 2, you compare the bytes at serial port with the previous value. So far, you have been very lucky to be able to read something : the answer here is always ZERO since the readings occur BEFORE the balance has been able to send anything! means that your loop stops immediately (if you are not convinced, jujst add an indicator to display the loop index. However, since you added a wait (0.8 s), when going to step 3, the balance has had some time to send something. Here, you should not have read again the number of bytes at serial port, but that unwillingly corrects the previous error and you can read most of the received data...
You should modify completely your algorithm. Usually, a balance send the weight as a string with some terminator (RC or LF). Accordingly, the algorithm should be :
1/ask the balance to send the data
2/read the serial port, concatenating the received chars until a terminator char is received or a timeout has occured
3/convert to number
CC
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
Project select data from the serial port
Hi everyone,
The project is about use labview to receive data from a serial
port wirelessly. The serial port will receive two values (X1 and X2) every 10
minutes. I want to use those two values as two inputs for my formula. How to
make selection? Many thanks.
Baicy
Solved!
Go to Solution.
Attachments:
port read.png 23 KBScan From String.
Using the first option, and putting some numbers in for the zeroes so it shows some kind of meaningful result.
Attachments:
Example_VI.png 12 KB -
I am trying to read my iMessages from my iPhone 4S on my iPad 2, but the messages do not show up on my iPad 2. I made sure that the receiving email address is the same on both devices and both are signed into my single Apple account.
Is it possible that the person who sent the message to your phone sent it to your phone # instead? Try sending a message to your phone via the email address and see if it shows up on the iPad.
-
I am unable to sync my Outlook calendar with my Iphone. I have noted that the Icloud Outlook add in is not ticked When I attempt to load it from the designated file nothing happens Can anyone help with this? Robyn
Re: check that the appointments in my phone are going into iCloud calendars....exactly how do I do this? I fear this is a really stupid question!
My iCloud account is set up with my Apple ID as one email account (for example [email protected]) which is the email account I use to sign up for internet sites like Amazon, Apple,etc, so that I can differentiate vendors/mass emails. But my default calendar on my iPhone is in a different email name (ie [email protected]) which I use for most communications to friends, relatives, etc. and it is this account that holds most of my appointments. To further complicate things I have other email accounts that I use for business/professional and community work. If I want all my calendars to show on my iPhone AND sync to my iCloud, do I set this at the phone level or the iCloud level? or both?
Let me clarify....It looks like if I go into appointments that I previously set up through my personal account (ie above [email protected]) and edit the entry on my iPhone, selecting the iCloud "home" calendar within the entry, it will then sync to my iCloud account, no problem....do I have to do this to EVERY entry I have? or is there a way to name my personal account as one to sync to iCloud? -
I updated my mac from 10.6.5 to 10.6.8 and now my CS 3 doesent start, its asking for a new license, but i never changed anything. Any Help with that thanks
I don't know if this update involved rewwriting the entire operating system whereby you essentially transferred the software from one system to another, but if so, then you need to uninstall and reinstall the software and reactivate it using your serial number.
-
hi, have a iphone/macbook itunes prob. i connected my phone to mac to add songs, and it wiped 99% of music from my phone. on the mac it still lists the songs on my phone but they are greyed out. can anyone help? very frustrated and want my music back.
I am having the same problem. I have just tried this. Unplug iphone > open itunes > delete all music from itunes library > close itunes > re-open itunes > add music from original folder > plug in iphone > select songs > press sync > unplug iphone using eject button onscreen > checked phone .... still nothing in music folder on phone. On itunes the "On this iphone" tab the songs remain there but greyed out.
-
I was being able to watch facebook videos from my ipad, and since i updated my IOS to 7.1.1,i dont know if it has to do with that but now i can no longer see any facebook videos
If you look at the preferences for Flashblock (access from the extensions window of the add-ons manager) and choose Whitelist, you can add a site to that window, and that site will not be blocked by Flashblock at all. You will not even see the Flashblock icon.
Maybe you are looking for
-
Opening and closing Posting Periods in New GL
Can anyone tell me how to open and close postings periods for leading and non leading ledgers if new gl accounting is active in the system.Is it through OB52 or some other codes. rgds Anuradha Ambekar Tcs.
-
HT1338 how can i update i photo 09 version 8.1.2 to iphoto 11
it will not let me because i have verion 8.1.2 and i need at least 9.1 any info on how to update to iphoto 11
-
It seems frozen in private browsing mode. Cannot get it back into normal browsing mode. Firefox is completely updated on the MAC as is the MAC Lion OS.
-
Using iWeb to publish my mobileme photo gallery -really weird bugs help plz
I have a really weird problem and have tried searching the forums already with no luck. I'm using iWeb09 to put mobileme photo album on my website. When I initially add the widget onto my page, the widgets will show a "preview" of what pictures are i
-
1.2 firmware, where are you Apple?
Apple I am sure that you are more that aware of the problems of firmeware rev. 1.2. Are these problems that those of us are having fixable? Or is this a hardware problem and you are trying to wait until the one year warranty is gone to inform us? To