LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

concatenate succesive strings from the serial port

I cant find the button to quote your message, i will answer as follows:

 

 

  • The while loop in both VIs has no purpose. Why are they there? Please explain.
       The while loop is useless,i know i inserted it only so that it would run continously in one session not multiple sessions.It was only for testing purposes and i will delete it.
  • Why do you have a delay in the FOR loop?
       
So that i can visualize string parsing and graphs.
  • Since your X are equally spaced, you can use a waveform graph or even a chart instead of an xy graph.
        This brings us to my first question.I want to plot the temperature readings against time from the RTC(prefferably).
  • Your FOR loop makes no sense. Simply use a "string to byte array".
       
As you will see in my attached file that i ahve used a for loop to circumvent the the flaw in the           match/true false string that it only detects the first char/part and not from the middle.

 

Thanks for your reply.Also is there any way i can get rid of the error.Tried everything.More needed lolzSmiley Tongue

Message Edited by wond3rboy on 09-21-2009 12:11 PM
LabVIEW 8.2,8.6,2009...still learning 😛
0 Kudos
Message 11 of 16
(958 Views)

wond3rboy wrote:
  • Why do you have a delay in the FOR loop?
       
So that i can visualize string parsing and graphs.

How? There are no graphs in the FOR loop....

 


wond3rboy wrote:

Your FOR loop makes no sense. Simply use a "string to byte array".       

As you will see in my attached file that i ahve used a for loop to circumvent the the flaw in the match/true false string that it only detects the first char/part and not from the middle.

 


That statement makes absolutely no sense. What does match true/false have to do with the FOR loop, it's not even in the FOR loop!

 

Can you give a bit more details on the error?

0 Kudos
Message 12 of 16
(954 Views)

wond3rboy wrote:

Hi i obviously want help...thats why i am posting it here.I did do some experiments but i made a mistake in the case select part as seen in this VI(the display part is seperate and i will integrate it with this). The string is supposed to be like this

 

Tempstart....96 temp readings(8 bit each)....TempstopSG1start....2readings(10 bit each)...SG1stopSG2start..2reading(10 bit each)...SG2stop

 

After this it is supposed to display the values( that part i have done).Since an attempt i on changing using cases for differentiating the 3 readings failed.I intend to use stacked structures now.Will upload a Vi soon.Sorry:(


Is this a different problem? I can see no resemblance of this problem to the VI you posted.

0 Kudos
Message 13 of 16
(952 Views)

Hi , i just added graphs to my previous file.I think i havent explained what i want to do...

 

I am taking readings from 3 sensors using a microcontroller.When i prompt the microcontroller(working on a suitable way) to send the data the microcontroller sends the data from all 3 sensors sequentially.First i wanted to use start and stop codes for the reading for each sensor but then found out that the match true false function doesnt work in the middle of a string( i was planning to using cases then..even had every thing worked out) so what i have done is that i have used a for loop and a for loop+string delete combo to do all the things parallely.About the trigger i intend to use a boolean to 0,1 function.Now coming to the two questions that i posted:

 

 1) If i send x points and y points sequentially, is there any way i can retrieve them i-e seperate them(i am thinking an odd even detection but wanted to know whether you guys have already done this and save me some work.

 

2) As soon as i am possible to seperate them i will  use the string concatenate function to combine the 10 bit sequentially sent reading from the other two sensors.

 

Thanks for your reply.

 

 

PS: Strangely enough i am not getting the error now.But when i did it didnt read and just displayed the error.

 

 

 

 

LabVIEW 8.2,8.6,2009...still learning 😛
0 Kudos
Message 14 of 16
(946 Views)
Hi didnt see your message yesterday.The pattern i posted yesterday was when i was attempting to do things with the mtach true false function which obviously as written in my previous post did not work so what i did was i took out the start stop codes part for each sensor and started sending just the readings and used string delete to 'distinguish' between the readings from different sensors.
LabVIEW 8.2,8.6,2009...still learning 😛
0 Kudos
Message 15 of 16
(927 Views)

Hi,

 

For the first question, I believe you are looking for the Decimate 1D array function.  If the values that you have are put into an array, you can use this function to seperate subsequent elements.  

 

As for your other question, could you please be a little clearer?

 

Cheers,

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 16 of 16
(895 Views)