06-11-2015 02:56 AM
I am not familiar with c codes. I just found out that a c-example means a c code example.
Can somebody help me with converting the C code to labview code?
Solved! Go to Solution.
06-11-2015 05:12 AM
@RvG wrote:
I am not familiar with c codes. I just found out that a c-example means a c code example.
Can somebody help me with converting the C code to labview code?
It looks quite straightforward, you have to use a few bitwise VIs - for example the header LRC is the sum of the two bytes (for the sent message 0x18 + 0x00) , bitwise inverted and increased by 1.
The data LRC is similar, but there you have to sum all of your data bytes, invert it bitwise and increase it by 1.
You can even calculate it with the built in calculator in Windows, if you switch it to programmer mode (Alt+3). Try to calculate the examples in your document or if you have the actual device just send a few commands, and try to calculate those. After this it should be quite easy to get this work in LabVIEW. Just remember the proper byte order when creating a message.
06-11-2015 05:41 AM - edited 06-11-2015 05:43 AM
This should work for you. The only real tricky parts were the byte swapping and noticing that the first two bytes are not used in the header LRC.
07-09-2018 08:26 AM
Hi! Would you mind sharing with me your communication .vi for controlling MagPuls devices? I am going crazy with the damned hexes... I must start my pulsed DC source ASAP. Thank you very much!