03-22-2018 07:02 PM
(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.
Solved! Go to Solution.
03-22-2018 10:07 PM - edited 03-22-2018 10:10 PM
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.)
03-23-2018 09:06 AM
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.
03-23-2018 10:19 AM
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.
03-23-2018 11:59 AM
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.