Showing results for 
Search instead for 
Did you mean: 

Need help with scan string of hex values when linked with a VISA

Can anyone help? I have proven concatenating two hex strings scaning them and casting them to floats in a seperate vi.
When I combine this portion with a VISA  to access to a multiplexor thru a serial port it bombs on the scan string function.
Please see attached vi. Is there anything someone can see that's not right?
0 Kudos
Message 1 of 6
0 Kudos
Message 2 of 6

We can't really tell anything without some data. Run your VI. Make the value in read buffer (hex) default. Remove all the VISA stuff. Change read buffer (hex) to a control. Does the problem still exist? If so, post that version. If not, put some error clusters in your program and report what errors you see.

Also, tell us what values you think should occur on each of the indicators, so we can tell what you think is wrong.

Message 3 of 6

The error below and printscreen attached.


Error 1 occurred at Scan From String (arg 1) in

NI-488:  Command requires GPIB Controller to be Controller in Charge. 

When I remove the scan from string it works OK.





0 Kudos
Message 4 of 6
Here is the version that converts the hex string to a float number. It works as expected.
0 Kudos
Message 5 of 6
Two things:

1. I noticed that you are using the "Run Continuously" button in the error image. Does the error occur on the first run or on one of the later ones? The port may not be able to close and reopen as fast as LV can run the VI again. Try using just the Run arrow to let it run one time.

2. What is the exact string received (including any non-printing characters) from the VISA Read the first time it runs?

0 Kudos
Message 6 of 6