07-30-2020 12:37 AM
Hi Tusharvp,
I would read the data stream and search for the (complete) "start of data" message (hex "FEFC 0101 0101 FD"). Once you found it you know you are in sync with your data stream and now you can parse the next messages (as has been shown by crossrulz).
@Tusharvp4 wrote:
I have a problem only in 0.25 second speed measurement in above VI..
Which baudrate do you use with your device?
07-30-2020 01:09 AM
My instrument is running on baud-rate 115200...I am receiving whole message without losing any byte on hyper-terminal at 0.25 second...But having issue with last VI..
How to 'start of message'..!! can you please modify in VI...??
However I am receiving 595 bytes in single message..Here I am displaying only 16 parameters..
07-30-2020 01:15 AM
Hi Tusharvp,
@Tusharvp4 wrote:
My instrument is running on baud-rate 115200...I am receiving whole message without losing any byte on hyper-terminal at 0.25 second...
At 115200 baud it takes ~52ms to transfer the whole data of ~600 bytes, so your VI should be able to handle the data.
@Tusharvp4 wrote:
How to 'start of message'..!! can you please modify in VI...??
Read the data, collect it in a shift register. Search for the "start of data" message, as described in your protocol description.
The data behind that "start of data" message can easily be parsed as now you are "in sync" with your data stream.
@Tusharvp4 wrote:
However I am receiving 595 bytes in single message..Here I am displaying only 16 parameters..
Because you don't parse the full data set, but only 18 data "subsets"…
Each message "subset" contains the parameter number, so use this to place the decoded value into the corresponding element of an array holding all 82 parameter values!
07-30-2020 04:08 AM
@Crossrulz and @Gerwd..
Thank you for amazing support...!!
@Gerwd...I did not understand yours last suggestion enough properly...Can you please little help me out through raw arrangement of NEW VI that your are suggesting me..
07-30-2020 04:26 AM - edited 07-30-2020 04:27 AM
07-30-2020 05:18 AM
How did you write string constant of "FEFC 0101 0101 FD"...??
07-30-2020 05:31 AM
@Tusharvp4 wrote:
How did you write string constant of "FEFC 0101 0101 FD"...??
Right-click on he string constant. Select Visible Items->Display Style. You should see a little 'n' appear on the left side of the constant. Click it and select "Hex Display". You will now see the bytes in the string in a hexidecimal format.
07-30-2020 05:44 AM
Oh sorry...I was considering x as cross...I thought that it is something new..
07-30-2020 06:06 AM - edited 07-30-2020 06:07 AM
@GerdW wrote:
this is showing the concept:
In the past, I ran into major memory issues when trying to parse large strings to handle serial protocols. So I started reading only what I needed to in order to find the sync byte(s)/frame. So I would go with something more like this.
07-30-2020 06:54 AM
@crossrulz
Thank you....!! Sir
I tried yours VI...
But having issue with 0.25 second speed measurement...
Error-1073807253 (Hex 0xBFFF006B) A framing error occurred during transfer...