09-20-2009 12:23 AM
Hi i want to know how one can concatenate succesive strings that are being transferred from the serial port.I am using a microcontroller to transfer Strain readings which has a 10bit ADC.So i want to display the with the same precision.I want to concatenate 2 strings from a total of 4 string in such a way that the first two are concatenated and the other two are concatenated.A
Also i want to know how we can seperate succesive strings (data for the xaxis and y axis of an xygraph).
Thanks.
09-20-2009 01:54 AM - edited 09-20-2009 01:55 AM
Well, there is a "concatenate strings" function in the string palette. That should do what you need. 🙂
I don't know what you mean by "... separate successive string ...", because I don't know what that is....
Can you give an example string and tell us how you want to seperate and what kind of output you want.
09-20-2009 04:49 AM
Then doing data communication you have to have some protocol describing how data is transferred. If the transmitter and receiver comes out of sync, you are able to resync(as an example). This do not have to be advanced. It could be so simple as separating every number with some character appearing only for this purpose. Then you set up the serial read function to read x bytes or until termination character.
I do not know how your program(s) works. But something tells me that your solution may not be optimal
09-21-2009 12:26 AM
09-21-2009 01:44 AM
09-21-2009 06:00 AM
By NOT posting any code and some additional information, you are actually wasting time on your behalf but also time for people trying to help you. If you wait much longer, people trying to help will just get tired of this thread and ignore it.
Just do it;)
09-21-2009 07:21 AM
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:(
09-21-2009 07:26 AM
As people are telling please post your code or atleast a snapshot of the code where you need real help.
Mathan
09-21-2009 11:24 AM
Hi are a few VI's that form parts of my final VI.I am also having a problem in reading serially.
'1073807298 in read visa 'is the error i get most of the time but not always when i read the data 'AAAAA'(just dummy for the real thing). From file serial1 byte.
09-21-2009 11:50 AM - edited 09-21-2009 11:51 AM
A lot of your code makes little sense. Apparently, you read 5 bytes at serial1byte.vi and I imagine that'll be the input to String_compare..." where you assume it is 8 bytes.
the entire VI could possibly look like as follows:
Can you please re-attach the VI again, this time include a few typical strings as diagram constants.