AnsweredAssumed Answered

trouble entering program on the E5270 using age5270_cmd()

Question asked by gtchaos on Feb 12, 2009
Latest reply on Feb 15, 2009 by gtchaos

I'm trying to enter a program into our E5270. I'm writing my code in C, taking advantage of the template given in the VXI plug and play manual. One of the commands available in the age5270.lib is called "age5270_cmd()", which takes 2 arguments: the first is the instrument handle and the second is a text string (no longer than 256 chars).

I want to use a series of these commands to enter a program onto the box using the SCPI commands "ST1"...."END" to define program #1. in the ellipses will be a series of other SCPI commands.

when I send the entire program all at once, everything works fine. for example:

ret = age5270_cmd(vi,"st 1;DV blah blah;pa 3;end");
check_err(vi, ret);
ret = age5270_cmd(vi,"do 1");

works with no problem. however, if i try to split the initial program definition up over several lines (like it says you're supposed to be able to do in the book), then the program hangs on the "st 1" command (i know this from the debugger).

my suspicion is that it has something to do with a terminating character that may or may not be in place at the end of the "ST 1" command that makes the agilent box think that i've just given it the whole program, a whole program that would be garbage because it didn't include the "end" command.

when i contacted my rep, i got nowhere and he couldn't tell me the exact code that defines the age5270_cmd() command.

Has anyone had this problem before? if it makes a difference, i'm also connected over the LAN, not connected via a direct GPIB connection.

Any insight would be greatly appreciated. Thanks