Use OptiSync with external input source trigger

Post Reply
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Use OptiSync with external input source trigger

Post by dashesy »

I have OptiHub. I want the camera frames to be synchronized to an external source (a DAQ that generates square pulses). It works great if I run a wire from OptiHub's "Hub Sync Out" to camera's sync input; when pulses are stopped frames are stopped, when pulses are generated frames get coming, but with wire unplugged frames keep coming regardless of sync input pulses.
Since it is V100R2 I was wondering if I could use OptiSync to avoid the extra cabling (assuming that the same USB cable between OptiHub and camera can trigger the camera when external trigger is detected on OptiHub).


Here is the code snippet:

sSyncSettings synch;
camlib.GetSyncSettings(synch);
synch.Mode = SyncModeCustom;
synch.SyncType = SyncTypeOptiSync;
synch.SyncInputSource = SyncInputSourceSyncExternal;
synch.SyncInputTrigger =SyncInputSourceSyncExternalRisingEdge;
camlib.ApplySyncSettings(synch);
Seth Steiling
Posts: 1365
Joined: Fri Jun 27, 2008 11:29 am
Location: Corvallis, Oregon

Re: Use OptiSync with external input source trigger

Post by Seth Steiling »

As long as your master OptiHub is receiving the external trigger, you should be able to use OptiSync over the USB cables from OH to camera to synchronize your cameras to DAQ pulses, without any need for wired sync to the cameras via RCA cables.

You will, of course, still need to sync any additional OptiHubs to the master via wired RCA sync, if you have more than one OptiHub in your setup.

For reference, consult the first page of the OptiHub quick start guide:

http://www.naturalpoint.com/optitrack/s ... 0Guide.pdf
Marketing Manager
TrackIR | OptiTrack
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Re: Use OptiSync with external input source trigger

Post by dashesy »

Thanks for the answer, yes I also thought that is the case, but it seems when no RCA cable is connected camera capture returns frames as if no sync is in place. I was wondering if the above options are the only settings I need to set to get this behaviour.
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Re: Use OptiSync with external input source trigger

Post by dashesy »

I finally figured it out (I hope).
Apparently I had to use:

synch.CameraSync = SyncForceUSBSync;

Otherwise I had to have the sync wire connected all the time (even for OptiSync). I appreciate if you have any more information (or API document), this option is not well described in the user guide.
Seth Steiling
Posts: 1365
Joined: Fri Jun 27, 2008 11:29 am
Location: Corvallis, Oregon

Re: Use OptiSync with external input source trigger

Post by Seth Steiling »

The recommended cabling would be:

- Connect DAQ via RCA to the "External SYNC In" port on the Master OptiHub.
- "Hub SYNC Out" from the Master OptiHub into any other OptiHubs in the system (assuming there are any)
- USB out to cameras, which will distribute the DAQ sync pulse to all of the cameras in the system.
Marketing Manager
TrackIR | OptiTrack
dashesy
Posts: 33
Joined: Fri Mar 27, 2009 8:47 am
Location: Utah

Re: Use OptiSync with external input source trigger

Post by dashesy »

Thanks Seth, yes this is the exact cabling I have (it is only one OptiHub I have).
It was just not so intuitive that after "synch.SyncType = SyncTypeOptiSync;" I also had to use "synch.CameraSync = SyncForceUSBSync;".

I did try, without the latter option (SyncForceUSBSync) camera triggers are ignored (i.e. when there is no trigger, frames are still generated). I wonder maybe there is some automatic fault detection, that ignores external input sync + OptiHub scenario, if external input sync does not produce pulses within specific time period.
Last edited by dashesy on Wed Dec 12, 2012 3:25 pm, edited 0 times in total.
Reason: mispellig
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Use OptiSync with external input source trigger

Post by beckdo »

This is not a recommended arrangement. However, I don't think it's going to cause problems.

The intent of our custom synchronization is to have all the V100:R2 cameras connected to the OptiHub and nothing connected to their individual sync plugs on the camera. Then camera functionality is controlled by the what signals you give Sync In and what settings you have set.

Trying to control when the cameras shutter triggers by hooking a signal directly to the wire sync input is not going to work. The primary reason is because that's not a simple square wave input. There is serialized data transmitted along with the synchronization information. You're not giving the camera that information when hooked in this configuration.

D
Post Reply