10-12-2021 01:28 AM
Hello Everyone,
At the first picture is my calculation of checksum. And the second one is the rules explained in the manual. I get always get AAH for the same parameter value, that is used here. How is it possible that mannual says that character ¬.
Thanks in advance.
Solved! Go to Solution.
10-12-2021 01:40 AM - edited 10-12-2021 01:46 AM
¬ is not the value of the checksum but the symbol used to indicate its position in the command.
10-12-2021 05:11 AM
The manual is lacking clarity, because e.g. x100 does not even fit into a U8. Also xAA is not the "not" symbol, at least here in the US.
If you want xAA as checksum character, here's one possibility:
It is almost impossible to help you because your code pictures are way too ambiguous. We cannot tell the datatype or display style of any of your constants, and that orange ware definitely has no business here at all!
10-12-2021 07:12 AM - edited 10-12-2021 07:13 AM
@altenbach wrote:
If you want xAA as checksum character, here's one possibility:
I can't believe I get to simplify Altenbach's code (it is 95% of the time the other way around)! There is actually no need to convert to a U16. You can just subtract from 0x00.
10-12-2021 08:01 AM
Hello,
Sorry,I have not been clear more. I need to take the parameter 15 as input. Here is my Vi. I am getting @ as checksum. The manual is also here. I was following page NO: 02
Thanks in advance.
10-12-2021 08:22 AM - edited 10-12-2021 08:22 AM
Your problem is you are mixing the hex value of a character and the value represented in an ASCII format. They are completely different. Remove all of those Number To Hex String whatnot from your checksum calculation and fix your value that you are subtracting from. Your VI can be simplified quite a bit to something like this.
10-12-2021 10:48 AM
@crossrulz wrote:
I can't believe I get to simplify Altenbach's code (it is 95% of the time the other way around)! There is actually no need to convert to a U16. You can just subtract from 0x00.
Ha! So why don't the written instructions not say that instead?? 😄
10-13-2021 07:54 AM
Thank you everyone.
The checksum error problem is kind of solved. But I still need your help.
Here is what i mean by kind of.
I am trying to send following six commands. I do not get error while sending them individually. Even the command DE,30; as we talked before. But my goal is to send them one after another 6 commands is the order as it is in the VI. and read the VISA read output and save them in a text file.
I have used this loop to do so. But i am always getting the back messege from the machine RR,15; According to Mannual, this means Chekcsum error.
Here is my whole VI and subvis , Is there anything wrong with the way i am using Loop? DEchecksum is the suvVI for labeled Imax.
10-13-2021 08:25 AM
Your checksum VI still has weird conversions to and from ASCII. Get rid of those as it just wastes CPU and memory.
And why are you subtracting 0x100 from your sum before then subtracting from 0x100? I don't remember seeing that in the manual.
And why are you using a While loop? Since you have a set number of commands to send, you should be using a FOR loop.
I went ahead and did a bunch of cleaning up of your code. See if this helps.
10-14-2021 03:22 AM
Helllo Crossrulz,
Thank you very much, that wokred. I had one more question. I have another machine called autowave. Is it possible to control them both fom same VI? Could you give me any direction?
Best Regards