09-10-2008 05:03 AM
Hello,
I have existing VB code which uses ctr2 on a 6602 as an output to trigger various operations:
task2.COChannels.CreatePulseChannelTicks(TC6602STR + "ctr2", "", "/" + TC6602STR + "Ctr0InternalOutput", COPulseIdleState.Low, 0, 2, 2)
task2.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/" + TC6602STR + "PFI31", DigitalEdgeStartTriggerEdge.Rising)
I would like to count these ctr2 output triggers (from ctr2 or PFI31) on a separate counter. From reading responses at:
http://forums.ni.com/ni/board/message?board.id=40&message.id=4607&query.id=148688#M4607
I think I want to use something equivalent to:
DAQmxSetCICountEdgesTerm(readCntr0Hndl, "/Dev1/Ctr0", "/Dev1/Ctr2InternalOutput");
But I cannot determine how to do this in vb.net.
Is it possible, or should I be using Daqsystem.ConnectTerminals?
Thanks.
09-11-2008 12:30 PM
Hi lemmik,
You have a great example in the forum you reference. You will have to create another counter task to count edges on your other counter. You can use the function you posted in order to use the internal output of counter 2 as the source for your other counter. The forum you referenced will guide you through the commands to set up the task. The equivalent VB .Net property is the CIChannel.CountEdgesTerminal Property. You can use the NI-DAQmx .NET Framework Help as a reference (Start>>Programs>>National Instruments>>NI-DAQ).