LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two different signals RS232

Hiii
i'm using labview 7.1 and right now displaying one ADC signal in labview in a grapg successfully using RS232 port.
But i want to display two different ADC signals on two different graps parallely(obviously yes!)...
when i.m receiving the signals one after the other means ADC1 first than ADC2 ,ADC1,ADC2....on serial port sequentially.
Please provide help regarding this as im out of ideas..
attatching my vi.......
thanks
rohit
0 Kudos
Message 1 of 11
(3,020 Views)
Hi, it might help a bit if you post the following information....
What type of hardware you have
Set some defaults on the controls that work

Then someone with sufficient knowledge will be able to point you in the correct direction.
0 Kudos
Message 2 of 11
(3,010 Views)
Hi,
 
Attached is just an simple way of directing read signal to 2 different array for plotting.
 
Assuming that you are getting One signal/ data each iteration, either ADC1 or ADC2.
Please beware of array size, which could built high up over time!
 
Regards,
ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 3 of 11
(3,007 Views)
I guess that the Go button is needed to start ADC output.
If this is the case, you may simply duplicate your main loop and related controls (Com port etc.).
The Go action should be put in a dedicated loop (that exit when you press Go) before both acquisitions start.
In order to be able to stop both acq loops with the stop button, you may change its mechanical action to Switch (not Latch), then use a local variable to stop one of the loops.
There are other techniques, though.
Last, add a small Wait function (Time & Dialog palette) in your loops. Even a 0 ms wait will help preventing the program to suck up almost all processor resources.

Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 11
(3,005 Views)

One Q&D solution would be to read 4 bytes on the serial port, and build the two signal values accordingly.

Be carefull, since you have defined a very large buffer (65000+), the values you read from the serial port may be there as results from previous readings. You should flush the port from fossils and use the bytes at serial port VISA command to be sure of the data you get.

BTW, the index array function can have multiple outputs. Just position the mouse over the node and pull. And you don't need to wire in an index value : implicitely, the output are generated as 0, 1, 2,....

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 5 of 11
(3,003 Views)
can you be a littile more clear i just want to display two different 8 bit values on two different graphs ,say which im receiving sequentially one behind the other as a two byte string and i want to seperate those two bytes n display both bytes (n process them) seperately
0 Kudos
Message 6 of 11
(2,997 Views)
If I have understood correctly then I have posted a modified version that allows you to test and see what is happening..

Hope this hits the mark?

Message Edité par Conseils le 05-26-2006 11:19 AM

0 Kudos
Message 7 of 11
(2,988 Views)


roiht a écrit:
can you be a littile more clear i just want to display two different 8 bit values on two different graphs ,say which im receiving sequentially one behind the other as a two byte string and i want to seperate those two bytes n display both bytes (n process them) seperately



Well... That's not exactlly what you were doing. Since you combined the two bytes as a single word, after inverting their positions, I thought you were waiting for >8 bits long signals. Since you were already successfull in reading the two values, why did'nt you wire them directly to indicators ? What was your problem ?
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 8 of 11
(2,983 Views)
Thanks a lot...
this is ADC01.vi is the exaclty i want to do but as i facing problem how to read two bytes from the serial port where first byte represents your first signal and second byte your second signal after which i can use the vi supplied by ADC01.VI
Help..
0 Kudos
Message 9 of 11
(2,981 Views)
Cool, I would still like to know what the hardware is though and don't foget to put stars (preferably 5 of course.....), I would suggest for all those who contributed to this thread.
0 Kudos
Message 10 of 11
(2,977 Views)