LabVIEW

cancel
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?
 
Thanks
Ken
 
 
0 Kudos
Message 1 of 6
(2,820 Views)
0 Kudos
Message 2 of 6
(2,818 Views)
Ken,

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.

Lynn
Message 3 of 6
(2,808 Views)

The error below and printscreen attached.

 

Error 1 occurred at Scan From String (arg 1) in Muxproject_Ken_r2.vi

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

When I remove the scan from string it works OK.

 

Thanks

Ken

 

0 Kudos
Message 4 of 6
(2,804 Views)
Here is the version that converts the hex string to a float number. It works as expected.
0 Kudos
Message 5 of 6
(2,802 Views)
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?

Lynn
0 Kudos
Message 6 of 6
(2,799 Views)