Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Trigger over RTSI from Traditional to DAQmx in VB.Net

Thanks, John.  I don't quite see how the CIChannel works with a COChannels task, but as you indicated it doesn't look like I need to set up the counter Source.

 

From all you sent, I have been able to get my app working using the PauseTrigger combined with the ConnectTerminals.  My updated setup is below. The code to arm the frame grabber for an acquisition stays the same, using RTSI0 as the trigger line.

 

Thanks for all your help on this!

 

--Dave

 

    Public Sub New()
            '
            ' Use 6025E DAQ counter to relay digital input wired to Ctr0 Gate to RTSI0.
            ' 1409 Frame Grabber then triggered from RTSI0
            '
            '...Connect Ctr0 Gate to RTSI0 to serve as trigger for frame grabber
            '
            DaqSystem.Local.ConnectTerminals("/Dev1/Ctr0Gate", "/Dev1/RTSI0")

            '
            '...set up DAQ task to pause counter based on Gate input
            '
            mownDAQCounterTask = New Task("CameraTrigger")

            mownDAQCounterTask.COChannels.CreatePulseChannelFrequency("Dev1/ctr0", _
                "PulseGenCameraTrigger", COPulseFrequencyUnits.Hertz, COPulseIdleState.Low, 0.0, _
                100000, _
                0.5)

            mownDAQCounterTask.Timing.ConfigureImplicit(SampleQuantityMode.ContinuousSamples, 1000)
           
            mownDAQCounterTask.Triggers.PauseTrigger.ConfigureDigitalLevelTrigger("/Dev1/PFI9", _

               DigitalLevelPauseTriggerCondition.High)
           
            '
            ' Initialize the frame grabber and grab an initial image
            '
            With mownFrameGrabber
                .Interface = "img0"
                .LoadInterfaceDefaults()
                .StartCondition = CWIMAQStartConditionTypes.cwimaqImmediately
                .StopCondition = CWIMAQStopConditionTypes.cwimaqOneShot
                .AcquireImage()
            End With
    End Sub

0 Kudos
Message 11 of 11
(1,140 Views)