Thread: Set Auto Trigger and screen dump via SCPI on B2902A


Permlink Replies: 7 - Pages: 1 - Last Post: Jul 17, 2012 1:56 PM Last Post By: nicolev Threads: [ Previous | Next ]
nicolev

Posts: 5
Registered: 07/12/12
Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 12, 2012 1:03 PM
Click to report abuse...   Click to reply to this thread Reply
I am trying to trigger a sweep protocol through SCPI commands. I want to be able to set the trigger on "auto" and do the equivalent of pressing the trigger button on the machine. I scoured programmers guides and command expert and only found commands to use the manual trigger. Is there a way to set the trigger to auto and then use the TRIG:ALL:IMM command to trigger the power supply?

My current code is below. Right now it loads everything and brings up the graph like it is supposed to, but it doesn't seem to trigger.
First, a state file with all of the sweep parameters is loaded, then:
DISP:ENAB ON
DISP:VIEW GRAP
TRIG:ALL:IMM (@1:2)
At this point the image shows and it should be a newly triggered data set, but it just shows the last data collected.

I am also trying to get a screen dump from the power supply. I used the HCOP:SDUM:FORM JPG and HCOP:SDUM:DATA? commands and it returns something, but I'm not really sure how to deal with the data and get it into a viewable format.

Any insights would be appreciated,
Nicole
MattC


Posts: 142
Registered: 03/19/10
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 13, 2012 3:40 PM   in response to: nicolev in response to: nicolev
Click to report abuse...   Click to reply to this thread Reply
Hi Nicole,

I am going to forward this to the appropriate group at Agilent. Thanks!

Matt
MattC


Posts: 142
Registered: 03/19/10
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 17, 2012 9:13 AM   in response to: MattC in response to: MattC
Click to report abuse...   Click to reply to this thread Reply
Hi Nicole,

I have heard back from the support group. Here is what they say:

Although the button is labeled “Trigger”, its function is the equivalent to the SCPI command “:INIT”.
You need to send “:INIT” instead of “:TRIG”.
Besides, you need to set TRIGGER count the same number as the sweep step.
Both ARM source and TRIGGER source should be “AUTO”.

Regarding the screen dump, have you ever referred Page 1-9 in the programming guide below?
ftp://hpyidmk.jpn.agilent.com/dist/dc_para/B2900A/manual/B2900_ProgGuideEN_2.pdf
There is an example using Microsoft Visual Basic .NET software.

Let me know if you need any other information.
nicolev

Posts: 5
Registered: 07/12/12
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 17, 2012 9:21 AM   in response to: MattC in response to: MattC
Click to report abuse...   Click to reply to this thread Reply
Matt,
Thank you for passing it along. Let me know if anyone has insights. I figured out the triggering issue, but how to format the screen dump data to get a picture is still an issue.

For anyone who might benefit, I used the following code to trigger and call data from the power supply.
DISP:ENAB ON
DISP:VIEW GRAP
FORM:DATA ASCii
TRIG1:ALL:COUN 50
INIT:IMM:ALL (@1)
FETC:ARR? (@1)
READ TEST X STR
TRIG2:ALL:COUN 50
INIT:IMM:ALL (@2)
FETC:ARR? (@2)
READ TEST Y STR

Best,
Nicole
nicolev

Posts: 5
Registered: 07/12/12
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 17, 2012 9:24 AM   in response to: MattC in response to: MattC
Click to report abuse...   Click to reply to this thread Reply
Matt,
Thank you for the information. I did actually figure out the trigger issue as you can see in my post above. Seems like we were posting right about the same time.

I don't think I have seen that reference. Thank you for the help!
Nicole
MattC


Posts: 142
Registered: 03/19/10
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 17, 2012 9:41 AM   in response to: nicolev in response to: nicolev
Click to report abuse...   Click to reply to this thread Reply
What are the odds of us posting at the same time? That's pretty crazy.

Let me know if that example works for you.
nicolev

Posts: 5
Registered: 07/12/12
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 17, 2012 1:26 PM   in response to: MattC in response to: MattC
Click to report abuse...   Click to reply to this thread Reply
Attachment s_dump test.vee (6.3 KB)
Hi Matt,
I took a look at the example and I actually have seen it before. thats were I got the SCPI commands for the HCOP:SDUM function. However, because I am using vee and not Visual Basic, I am having a hard time finding an analog for the "FileStream" command in visual basic. Do you know of anything? I am at the point were I can get the binary block output and I just need to know how to format or save it to get the picture.
My vee code is attached.
Nicole
nicolev

Posts: 5
Registered: 07/12/12
Re: Set Auto Trigger and screen dump via SCPI on B2902A
Posted: Jul 17, 2012 1:56 PM   in response to: MattC in response to: MattC
Click to report abuse...   Click to reply to this thread Reply
Attachment s_dump test.vee (6.2 KB)
I actually just figured it out. Use a toFile command with the data in a BinBlock Byte Array and it works. Attached is final working code for anyone who is interested.
Nicole

Point your RSS reader here for a feed of the latest messages in all forums