Tom Eilers Posted 3 hours ago Report Posted 3 hours ago I have a Marstek Venus3 Home battery that communicates with a Marstek CT003 netpower meter. I intercepted a data package with Wireshark from Venus to CT003. If I send this captured data package to the CT003 with UDP in Labview I receive a good answer from CT003. No problem so far. But if I want replicate how they calculate the CRC checksum from that package, I don't get the right CRC checksum in Labview. See VI. The last 2 bytes in package are the CRC checksum. In the VI is the Python code the I found at Github, to see how they calculate the CRC checksum and replicate that in Labview. Question what am I doing wrong. CT003 CRC checksum.vi Quote
ShaunR Posted 2 hours ago Report Posted 2 hours ago The CRC is in hex. You are using to Decimal instead of to Hex -> Quote
crossrulz Posted 1 hour ago Report Posted 1 hour ago You should replace the Type Cast with a String To Byte Array. It turns the type cast into a NoOp under the hood and is just a lot easier to read. I also highly recommend you turn on the Display Style for all of your string controls and indicators (Right-Click->Visible Items->Display Style). This is a way of making sure you know how your data is encoded and eliminate a lot of confusion. CT003 CRC checksum.vi Quote
Tom Eilers Posted 17 minutes ago Author Report Posted 17 minutes ago Thank you for your very fast answers. How stupid from me using the wrong conversion. Also the simplification of String to Byte array. Good night. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.