From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error in Instek Power supply run . Thanks for help.

Solved!
Go to solution

 (1) I have Instek PSH-3610.

(2) I just want ready the power supply current value when it is ON.

 (3) I connect it to COM1 in my PC.

(4) I run the NI sample vi.


GWPS320x Measure Current_from_NI.vi
code -1073807339
VISA Read in GWPS320x Measure Current.vi
see picture GWPS320x Measure Current_from_NI.vi_error

 

(5) I then add VISA serial control, open and close.

but it still have error.

GWPS320x Measure Current_testtemp.vi

see picture GWPS320x Measure Current_testtemp.vi_error

 

(6) Any one have a vi for this?

Thanks for help.

 

 

0 Kudos
Message 1 of 5
(2,569 Views)

The string constants where you write the command.  Right click on them and make the display style visible.  You'll see they are  set for Normal display instead of \ code display.

 

Since your string shows \r\n, and is in normal display, that means you are sending a literal backslash, r, backslash, n and that won't work as termination characters and explains why the commands time out.  Change it to \code display and clean up that string so that it will be \r\n (instead of \\r\\n like it will now show.)

Message 2 of 5
(2,543 Views)

Thanks

  I change to code display.

 \r\nCHAN1:MEAS:CURR?\r\n

but it still have same error.

 what else do I need change.

Thanks for help.

I attached new one. 

 

0 Kudos
Message 3 of 5
(2,513 Views)
Solution
Accepted by topic author zy6

Are you sure you want the carriage return linefeed at the beginning of the command?

Are you sure it is carriage return and linefeed, or should it just be a carriage return, or just a linefeed?  What does the manual say?

 

Is the instrument set up in a mode to accept remote commands?

 

Beyond that, I don't have any ideas.  I'm not familiar with that particular instrument.

Message 4 of 5
(2,508 Views)
Solution
Accepted by topic author zy6

It looks as if the issue here is that the supply is connected through RS-232.  You will need to send the SCPI command/query followed by the \n character.  Then depending on your COM settings may need to physically send the \r character.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
Message 5 of 5
(2,505 Views)