10-29-2014 09:10 PM
Hello,
I'm currently attempting to control a pair of CSW5550 power supplies and having all sorts of problems.
On LAN, I have installed the devices as a TCPIP device to send SCPI commands to, as here:
Everything works great from the MAX window. I can send most queries with no problems, in particular the *IDN? query.
When I pop over to running a vi on the same VISA resource, however, I get very inconsistent results. Sometimes a read error, sometimes a write error, and sometimes I get a reading. Most often no error, but an error from the device and no data returned. Same thing for trying to perform other read operations, and it's clear from the response of the device (often 'invalid parameter', others) that the instrument is getting somewhat garbled commands.
The same thing goes if I try to run it over serial USB. This is what I'm running in the vis:
I mean, this is really basic stuff. I've tried varying the timing, newline termination, setting up and flushing the buffer.
So ... what is the difference between the queries MAX is executing and what I'm doing, and how can I troubleshoot it?
Thanks in advance,
C
10-30-2014 08:49 AM
You have errors in NI-MAX, and it still works?
10-30-2014 11:57 AM
11-03-2014 11:21 AM
Some linefeeds and timeouts fixed this.
C
12-01-2016 08:31 AM
Can you be more specific in your solution? I am running into a similar problem connecting a Keithley PS. MAX calls work, vi calls do not.
Thanks!
12-01-2016 08:46 AM
@mbrue101 wrote:
Can you be more specific in your solution? I am running into a similar problem connecting a Keithley PS. MAX calls work, vi calls do not.
Many instruments want to see a Carriage Return and/or a Line Feed to know when the message is complete. You may have to add these to your writes.
12-01-2016 08:52 AM
You are referring to \r and \n? in the order specified by the device manual? That doesnt resolve. Same Timeout error on read with no data returned even reading 1byte at a time and concatenating (in a while loop until byte= 0xA). It is occuring on the first read cycle.
12-01-2016 09:32 AM
Then I recommend you start a new thread and give a lot more information on your setup (what hardware are you using, your code, etc).