07-27-2020 03:46 AM - edited 07-27-2020 03:48 AM
@Gerdw..
Once again thank you for replying me very quickly..
I am leaving Start & End bytes in while calculating parameters..You may check it in SubVI..
To be frank, I am not familiar with TermChar...Hoping that you will make correction in my mistakes & also enlighten me for learning knowledge in the my journey of LabView...
Here I am not receiving 595 bytes in read byte returns...What changes i needed to do..
07-27-2020 04:02 AM
Hi Tusharvp,
@Tusharvp4 wrote:
I am leaving Start & End bytes in while calculating parameters..You may check it in SubVI..
You did not provide any subVIs…
@Tusharvp4 wrote:
To be frank, I am not familiar with TermChar...Hoping that you will make correction in my mistakes & also enlighten me for learning knowledge in the my journey of LabView...
The TerminationChar is used by VISARead to end the current reading: you get exactly one message per VISARead (except for errors like timeout). This way you can easily sync data reading and easy the data parsing as you know you have one full message!
@Tusharvp4 wrote:
Here I am not receiving 595 bytes in read byte returns...What changes i needed to do..
I don't know. You failed in providing code and even did not explain this "595" number…
07-27-2020 04:21 AM - edited 07-27-2020 04:22 AM
I have given all details..Just read our conversion..
I wrote my labview program from example of continuous read & write serial program...
Here i am facing problems of receiving returns bytes...I am not getting all bytes in same manners...Sometimes its coming false & incorrect order bytes
07-27-2020 04:28 AM
Hi Tusharvp,
@Tusharvp4 wrote:
Here i am facing problems of receiving returns bytes...I am not getting all bytes in same manners...Sometimes its coming false & incorrect order bytes
As you have not given all details (missing [complete] manual, missing subVIs, missing example data) you need to debug on your own!
07-27-2020 04:44 AM
SubVis in program to after "string to byte array conversion"...There, you can understand protocol calculation..
07-27-2020 06:12 AM - edited 07-27-2020 06:14 AM
Hi Tushar,
@Tusharvp4 wrote:
SubVis in program to after "string to byte array conversion"...There, you can understand protocol calculation..
I repeat: YOU DID NOT ATTACH ANY SUBVI SO FAR!
And please don't request even more help by sending personal messages as this only disturbs! Ask you questions in this thread and provide the information you were asked for…
The numbers in your images look quite ok, atleast there are a lot of "254"/"253" message start/end markers.
But keep in mind: when asked for data then you should not send images of data. No one will attempt the type all the number from your image when you can provide such data easily by setting them as default values in your controls/indicators!
07-27-2020 08:25 AM
@Tusharvp4 wrote:
To be frank, I am not familiar with TermChar...Hoping that you will make correction in my mistakes & also enlighten me for learning knowledge in the my journey of LabView...
Just stop everything you are doing and go watch this: VIWeek 2020/Proper way to communicate over serial
In summary, you need to use the protocol to properly read the data. I give examples in that presentation.
07-29-2020 02:21 AM - edited 07-29-2020 02:22 AM
@crossrulz..
Thank you for well explanation..It gave me much knowledge regards about serial read..
I made few changes accordingly it..
I am running my instrument with three speed…1s ,0.5s ,0.25s
I am getting full bytes in returns count at 1s , 0.5s speed..
But data are being lost at data 0.25s…
07-29-2020 05:55 AM - edited 07-29-2020 05:55 AM
So where is the 595 bytes coming from? All I have seen from your protocol says you should be receiving 18 values at 7 bytes per value, which is 126 bytes.
Furthermore, how do you know you actually starting reading at the start of the data stream? You could be starting from the middle of the data. YOU NEED TO FOLLOW THE PROTOCOL TO MAKE SURE YOU HAVE A COMPLETE MESSAGE. This includes reading until you find the start byte, checking the command value, reading the data, and verifying the end byte. If any of those steps fail, you are not synchronized with the data packet and try again. This becomes increasingly important at the faster data rates.
Also, your conversion VI can be simplified A LOT. I did a Reshape Array to change your 1D array into a 2D array with each row being the 7 bytes. I could then autoindex on the 2D array. From there, I replaced a lot of math with a couple of Join Numbers and your case structure with a Power Of 10 function.
07-29-2020 09:41 PM
@crossrulz
Here..I am attached protocol..You will understand it better now..
I have a problem only in 0.25 second speed measurement in above VI..