Author Topic: Rigol Oscilloscope (DS1104z) Detect External Trigger when using Remote Control  (Read 1760 times)

0 Members and 1 Guest are viewing this topic.

Offline twistarTopic starter

  • Newbie
  • Posts: 6
  • Country: us
I'm trying to set up a remote logging system using a Rigol DS1104z oscilloscope. The scope is monitoring a few signals and is triggered externally. Every time the trigger happens I would like to record the data that is displayed on scope on my computer which is connected to the scope via USB.

I can currently control the settings on the scope using a python script which communicates with the scope through the VISA interface sending various SCPI commands. I can configure the scope as desired and even grab the data off of the scope and write it to memory on the computer.

However, I don't know how to synchronize the data grabbing with the external trigger from the scope. What I'm searching for is some sort of way that the scope can send a signal over USB when it is triggered (or better when it finishes acquiring the data after being triggered) so that the Python script can then be "triggered" to grab the data at the right time.

I do know that it is possible to monitor the "Trigger Status" over USB to determine if the trigger is waiting or triggered etc. In principle I could continuously monitor this to try to notice if the scope ever becomes "triggered" and if so I could then monitor for when the scope finishes being triggered (data is acquired) and use that as my signal for reading out the data. My feeling is that this will be slow and unreliable, especially if the trigger pulse is short in time.

I also realize there may be data bottlenecks, for example if the data is still being transferred by the time the scope gets the next trigger. For now, assume that the scope gets triggered once and then there is plenty of time for data acquisition/transfer before the next trigger arrives.

Does anyone have any tips for how I could achieve this?
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17150
  • Country: 00
I also realize there may be data bottlenecks, for example if the data is still being transferred by the time the scope gets the next trigger. For now, assume that the scope gets triggered once and then there is plenty of time for data acquisition/transfer before the next trigger arrives.

The 'scope won't ever send you messages all by itself so you don't really have a choice except to set it to single shot mode then check the status every few seconds to see if it triggered or not.

I think the ":TRIG:POS?" command will tell you if it triggered or not.

The other way is to attach something like an Arduino to the trigger out connector and get that to send you messages.
 
The following users thanked this post: twistar

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 7182
  • Country: hr
BNC in the back of the scope is Trig OUT signal. You need to make piece of hardware that will detect pulse and inform your software that trigger happened.  It can be something simple, like Arduino connected to serial port, or even maybe some ready made digital I/O card.. I presume you have PC next to scope..
 

Offline twistarTopic starter

  • Newbie
  • Posts: 6
  • Country: us
Fungus, thank you. Putting the scope in single mode and then periodically polling it to find it if it has triggered is going to work for us!
 
The following users thanked this post: Fungus

Online tv84

  • Super Contributor
  • ***
  • Posts: 3303
  • Country: pt
It can be something simple, like Arduino connected to serial port, or even maybe some ready made digital I/O card.. I presume you have PC next to scope..

Agree. If the trigger is external, why not feeding the same trigger to the PC ?  :-//

Seems the most logical setup.
 
The following users thanked this post: 2N3055


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf