Posted Fri, 21 Jul 2023 02:03:09 GMT by Fischer, Stephen Sw Engineer
I wrote the post below about my embedded system sending SCPI commands to the AFG3102C through ethernet using the vxi11/rpc protocols.

    https://my.tek.com/tektalk/signal-gen/8582d75b-a5ef-ed11-a81c-000d3a5cffcf#86b7fc57-a5ef-ed11-8849-000d3a314d17

I was able to get this communication working. Generally, I followed the instructions at these websites:

    https://github.com/applied-optics/vxi11
    http://optics.eee.nottingham.ac.uk/vxi11/

So now my embedded system can send arbitrary SCPI commands to the AFG3102C to adjust the settings.

My next issue is with the command latency. I would like to be able to update the AFG3102C settings around 20-30 times per second. 

I have a trigger signal that goes to both the AFG3102C and to the embedded system that sends the SCPI commands to the AFG3102C.

When the trigger signal goes from high to low, I want:
 
  • the AFG3102G to produce on the output a pulse according to its current configuration
  • the embedded system to send a command to the AFG3102G to adjust the AFG3102G configuration for the next trigger cycle. I'm typically updating the pulse delay using SOURCE:PULSE:DELAY.
If the trigger happens 20 times a seconds, that's 50 milliseconds between each trigger.

Is 50 milliseconds enough time for the AFG3102G to receive a SCPI command and make the adjustment in time for the next trigger?

The embedded system is fast and responsive, it is able to transmit the SCPI command over ethernet within 1 millisecond of the trigger. So the AFG3102G should have nearly the full 50 milliseconds to process the command.

In my testing so far, I can update the AFG3102G using SCPI commands only around 2-4 times per second. If I go faster than this, the command does not seem to take effect.

Does this sound right?

I am assuming that if the AFG3102G receives a SCPI command after the trigger happens while it is outputting the pulse, the change to the configuration will not affect the output of the current signal being produced.

To note, the triggering of the AFG3102G output at 20-30 times per seconds works fine. I just can't change its settings using SCPI commands sent over ethernet at this rate.

If the AFG3102G cannot be updated over ethernet 20-30 times per second, is there another TEK waveform generator model that can do this?

Thanks for any help.
Posted Mon, 24 Jul 2023 21:39:18 GMT by Teles, Afonso
Hi Stephen,

2-4 times per second seems about right, you could try using a different interface (like USB or GPIB) and some optimizations but at its core the AFG3000C is not meant for that type of fast configuration.

I'm not sure your assumption about the SCPI command only taking effect on the next trigger is true for all commands, I would certainly suggest you test that assumption before relying on it.

Our newer AFG31000 might be a better fit for your application. Specifically, its sequence mode might be very well suited to what you're doing and might allow you to do it all within the AFG, with no SCPI required, which would significantly increase the speed of the test.

You must be signed in to post in this forum.