03-19-2014 06:36 PM - edited 03-19-2014 06:42 PM
Hello,
I am trying to trigger an on demand pulse from an HP 33120A function generator.
The pulse has to be a single, 0-5V ramp with adjustable frequency/period. I was able to get as much from the FG by using Burst and manually triggering off the front panel. Now I would like to get the same functionality from a LabVIEW VI.
While there is a driver for the device, the burst function is, unfortunately, not applicable to the model I am using. I found a similar issue on the forums and followed the SCPI code provided in the answer with some of my own midification (http://forums.ni.com/t5/LabVIEW/33120A-Pulse-Mode/td-p/1088106).
Unfortunately, my VI is not producing the same waveform as the manual triggering off the front panel. It hovers at the offset value and gives me a few square waves down to zero when I run the VI. The square waves are oddly spaced and I usually see 4-5 even though I specified 1 cycle in the VI. Reading through the 33120A, I get the impression that the issue is my not turning off the previous waveform but, if that's the case, I can't figure out how I would do that.
I am starting to move away from only using drivers and into modifying SCPI code but I am still quite new to this. Would really appreciate some advice on what the problem could be. I modified my original VI twice; once to configure only the burst with the FG wave parameters set manually and once to just set up the waveform with no burst. The former did not give me much better results and the latter works fine so I'm back to thinking the issue is in the transition.
I am attaching the initial VI (b) with the two modifications just in case (c, d).
Hope to hear from you,
Yusif Nurizade
Edit: Burst string should say TRIG: SOUR BUS instead of EXT although neither works.
Solved! Go to Solution.
03-20-2014 02:59 PM
My first advice when looking at SCPI commands to instruments is to perform a NI I/O Trace while executing the code. This will allow you to see exactly what string commands are being sent to the device. Sometimes building commands in LabVIEW results in minor formatting mistakes that will cause an instrument to not recognize something as simple as an end of line.
To that end, the most common error that I have encountered is viewing the slash codes when building the command strings. See this KB article about how LabVIEW interprets ASCII characters in string constants to understand more on why these may cause an issue.
03-20-2014 05:18 PM
Karl,
Thank you for the reply and for introducing me to NI I/O Trace.
I followed the white paper and ran the program and verified the commands I am sending. Furthermore, Tech Support over at Agilent tried my SCPI code in their VEE language and said everything works fine.
Perhaps someone in the community can see something in the trace that I am missing? Any other advice is greatly appreciated.
Hope to hear from you,
Yusif Nurizade
03-21-2014 04:21 PM
03-24-2014 04:08 PM
Yusif,
As another troubleshooting step, could you run Agilent software to communicate with the device and use NI I/O Trace to monitor the string commands being sent to the instrument? I have seen issues before were third party devices and software are looking for particular strings but may be inserting different termination characters that weren't explicitly defined. Using I/O Trace on their software's communication will allow direct comparison.
04-06-2014 02:26 PM
Sorry for the later reply fellas; I've been in contact with Agilent trying to figure out a fix.
To address some suggestions;
Albert, I've been in touch with Agilent. They've reproduced my SCPI commands on their end with their software (VEE) and got the desired output. I thought that maybe the issue was with the commands I was sending via LabVIEW so I downloaded a trial of VEE and sent the same commands that worked for Agilent. With VEE I have the same problem; some of the commands, relating to frequency, shape and amplitude are processed correctly, while the burst commands are not.
I suggested the firmware issue to them and they agree it might be what's causing the problem. Unfortunately, the device is no longer supported and it would be difficult, if at all possible, to get the update especially considering this is a time sensitive project.
Karl, I've run NI I/O Trace on both the .vi and VEE. The commands seem to be going over without issue. I am led to believe that the issue is with the instrument since Agilent was able to get the desired result using my exact commands and I can't reproduce the same using their software.
I must confess I am a bit confused as to how this could be a firmware issue if some of the commands are going through and the whole thing works if I program manually off the front panel.
Please advise,
Yusif Nurizade
04-06-2014 03:12 PM
04-07-2014 05:42 PM
Based on the feedback I've gotten on the forum and from Agilent it looks like the firmware is the issue.
I will be in contact with Agilent's service department to see if we can arrange for them to update the device although that might be a problem as it is no longer supported.
Thanks you everyone for all the help and suggestions,
Yusif Nurizade
12-21-2017 05:44 AM
Hi Yusif,
I'm also trying to cause a burst on a 33120A and did find your suggestion to solution. (Hope you did manage to solve the SW issue.) When I try to use your upload (Abilent 33XXX series.lvlib:Init_burst 3_19b_2014 (2) I have a broken arrow with error explanation "This VI is connected with a library that does not include the VI. The VI might have been deleted from the library. Add the VI to the library again or select File»Disconnect from Library." Do you know what library it is looking for? And where I might find it and how I add it. Do you have a solution which works and you are able to post it? ( I understand that this is couple years old and might not be something available). (I need to also state that I'm very new to LabVIEW and just starting to get in to it.)
Hope you will be able to help me out,