12-02-2008 07:39 AM
12-03-2008 10:03 AM
You should learn how to use probes when debugging your program. The first and third error messages state that the input to the Scan from String function is not correct. If you put a probe on that wire, you can see exactly what is there. Left click on the wire and select Probe. A box will pop up and stay in the foreground. Run your code. The value of the wire is shown in the box.
In the first error message, you specify %d. This means a decimal number. If the input string contains any characters other than 0 to 9, you will get this error message. Depending on the return value from the *STB? command, you may have to change %d to %s%d or something like that.
The last error message pertains to the same thing. The input to the scan function does not match your format string. Probably similar reason as the first error message. Again, use a probe to see what is on the wire. You can also turn on execution highliting (the light bulb) and you will see exactly where the errors occur. Look at the Error Out wire. If no error occurs, the text "OK" will appear briefly on the wire. If an error occurs, the text "ERR" will appear briefly. This only happens when you have execution highliting turned on. Then you can probe the inputs to the function where the error occurs.