Thanks a lot! I want to try this but am not sure what all those icons are, is it possible to send as a VI? or is there a way to identify all of those operations and icons?
Nice job Jeff.
Another example of a poorly written manual.
"The checksum is appended to responses as an ASCII representation of a two digit hex number representing a mod256 negated sum of all characters in the response up to and including the comma just prior to the checksum itself."
I would interpret that as the response being the entire returned string, which would include the AZ. (and then leaving off the last two characters that are the checksum since it explicitly excluded them.) Nothing is obvious in that response that the AZ at the beginning should be excluded as well.
It doesn't even make sense that they would drop off just the AZ at the beginning and not also drop off the comma right after that.
some silly C coding weenie. "AZ" used as STX, read til port buffer empty, cast to long, Add add to next val =0? at end, OK no err.
(Really you still see some embeded junk like that)
Another implementation. Typecast the value to an I8 so that it can be negated.
I think their description of "negated" mod256 is kind of confusing. You really can't negate an unsigned 8-bit integer, when you are actually doing the 2's complement. (LabVIEW won't wire the negate function to a U8 wire.)
Trying to google negated mod256 came up with hits, but none were particularly clear. Many hits just ignored the negated part and only talked about the mod256. Googling mod256, and googling 2's complement gave hits that were much easier to figure out what operations they were doing.
Thanks Jeff, I tried implementing that code, but I either did not do it correctly, or am mistaking what is actually happening. I do not get the checksums to agree....I have appended my code and attached a screenshot of my results. Thanks for all your continued help everyone.
I am not sure, but am I correct in thinking "Sent" field is what the checksum should be in hex, and that it should match the last two characters in my return string? If so, it always returns FF regardless.
I'm having troubles now just running my program...I am not sure why...I now receive this error:
VISA: (Hex 0xBFFF003E) Could not perform operation because of I/O error.
I have attached my code....Thanksfor any help!
Probably a problem with your serial port.
Make sure it still exists in Windows Device Manager.
Then check if it exists in Measurement and Automation Explorer.
Make sure nothing else is trying to use the port at the same time.