08-12-2022 06:48 AM
08-12-2022 07:00 AM
Hi Gerd,
Here are the files.
Warm Regards,
08-12-2022 08:09 AM - edited 08-12-2022 08:10 AM
08-12-2022 10:13 AM
The ending string to U8 and shenanigans should give the same result if you simply subtract 48 from the string to U8 conversion.
08-15-2022 09:13 AM
Hello everyone,
So the packet formatter works very well. I removed all the coercion dots causing all the issues.
I am trying now to perform packet parser. It performs in exactly opposite way to the packet formatter. I am trying to determine the presence of preamble, and if found, extract payload, SYNC word and finally packet counter. I want to read the bitstreams directly as U32 and U16 integer. The payload is read as U8 integer and then I try to convert it back to string. I displayed each byte array after the case structure and all of them read the right bits from the received bit stream. But after conversion to string/U32/U16, somehow they end up with wrong information. It is mainly because of the coercion dots, which I cannot remove in packet parser function.
The screenshot is attached here.
As you can see here, there are coercion dots after byte array to string conversion. Why do you think they exist? How do I remove them? Kindly let me know.
I have also attached the vi files for your reference. If you need any other information, let me know.
Warm Regards,
08-15-2022 12:09 PM
@labview_wannabe wrote:
As you can see here, there are coercion dots after byte array to string conversion. Why do you think they exist? How do I remove them? Kindly let me know.
Any code that requires dynamic data can be greatly simplified!
There is never a need to maximize the diagram and front panel to the screen.
Why don't you create a simple toplevel VI that contains the formatter and parser, then wire the parser to the formatter input and see if the result is the same as the original input.
08-15-2022 12:58 PM
See if this can give you some ideas.
There are many open questions (see red text). Do you have a link to the manual?
08-16-2022 07:25 AM
Hi altenbach,
1. the Byte order is not specified. But in my opinion it should be MS byte first based on expected sequence in the main vi file.
2. Thee 2 payload length is just used for Synchronisation and packet integrity verification. Two payload length acts as double verification. Verifies packet integrity by checking if both packet length fields are same and if the payload length are same as well. Kinda like CRC but lot simpler.
3. 0,1 not reversed. Not specified in the manual though.
The link to manual is lab1_ho_v0.pdf (ntu.edu.tw)