Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot control magnetic valves and motor using Keysight 34972A

Solved!
Go to solution
Highlighted

girish_jadhav_0-1594299382753.png

Using switch.vi provided by Keysight I am trying to control some magnetic valves and motors. It was working as expected but for an unknown reason, it has stopped working now. I get no error messages when I run the program, it sends the value but on the hardware side, there are no changes.

 

Sometimes I get -113 or 309 error on the switching unit display (https://documentation.help/Keysight-34970A-34972A/OKEJ%20-%20Error_Messages.htm). The channel is list is correct and I don't know what undefined header (-113) means. The only change I made after which it stopped working was changing enum control to type definition and use it control four motors (all have bypass or no bypass mode).

 

Anyone knows what can be possibly causing this or where I might be making in my code. I have attached an example code (control of one motor and valve).

0 Kudos
Message 1 of 7
(300 Views)
Highlighted

Error -113 = Undefined Header = One of your commands was formatted wrong.  This typically means you are sending a command with a header string it does not recognize.  Then 309 states that the channel list is not properly formatted.  One of these errors could easily cause the other.  You really should call the Error Query after you send your commands and stop the loop when there is an error.  This way you can detect it and start troubleshooting from there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 7
(280 Views)
Highlighted

@crossrulz wrote:

Error -113 = Undefined Header = One of your commands was formatted wrong.  This typically means you are sending a command with a header string it does not recognize.  Then 309 states that the channel list is not properly formatted.  One of these errors could easily cause the other.  You really should call the Error Query after you send your commands and stop the loop when there is an error.  This way you can detect it and start troubleshooting from there.


It is working again now. I just wired OPEN/CLOSE (F: Close) terminal of switch.vi to constant F wherever it was necessary. I don't know how this solved the issue. I thought, if it is not wired, it is always set to False.

 

How can I call the Error Query? Could you please tell me how it can be done in the example VI I have attached?

0 Kudos
Message 3 of 7
(256 Views)
Highlighted
Solution
Accepted by topic author girish_jadhav

It might be that your card doesn't support an option you are trying to set.  But it might also be that those two configuration commands take place in parrallel, the instrument won't like that.  The instrument has only tiny processing power for SCPI commands so it receives a set of commands and queues them up to process.  Trying to send the instrument simulataneous sets of commands might have strange consequences.  Change it so the commands are sequential (i.e. don't branch the VISA Resource name and error wire.   

 

Craig

Message 4 of 7
(252 Views)
Highlighted

Look in the Utility palette of the 34970 driver.  It is right there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 5 of 7
(249 Views)
Highlighted

@cstorey wrote:

 Trying to send the instrument simulataneous sets of commands might have strange consequences.  Change it so the commands are sequential (i.e. don't branch the VISA Resource name and error wire.   


If I understanding correctly, should I just connect them in series if they have the same resource name or is there any other way to do it?

0 Kudos
Message 6 of 7
(208 Views)
Highlighted

@girish_jadhav wrote:

@cstorey wrote:

 Trying to send the instrument simulataneous sets of commands might have strange consequences.  Change it so the commands are sequential (i.e. don't branch the VISA Resource name and error wire.   


If I understanding correctly, should I just connect them in series if they have the same resource name?


YES


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 7 of 7
(203 Views)