Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Start application in selected Z-Index reload phase

Hello,

I'm using the Measure Buffered Position (NI-TIO).vi example with a 6602 board with X4 encoding selected and Z Channel Indexing enabled.
I�m using a motion encoder, which is counting down from 1000. Each time the counter rolls over; it generates the pulse terminal count in pulsed mode.
I want to use TC for resetting my counter to a pre-specified value by Z-Indexing and as Gate Signal for other counters.
The Gate Signal is no problem, but if I want to reset the counter when the Z-Index pulse (TC) arrives I have to specify the Z-Index reload phase. My problem is that I don�t know in which reload phase TC occurs and so I can�t specify the correct reload phase.
I�ve read the solution that it�s possible to OR
channel A and B with channel Z (TC), but I don�t want to use external circuits.
Is there an alternative way to reset/reload my counter or is it possible to start my application in a selected Z-Index reload phase (e.g. A HIGH, B HIGH)? If I would know the reload phase in which my application starts, I could specify the Z-Index reload phase when TC occurs.

Anyway, any information would be greatly appreciated.

Thanks,

Floh
0 Kudos
Message 1 of 2
(3,205 Views)
See if the attached vi's help. I made a small modification to the same shipping example "Measure Buffered Position..." which peeks at the state of the A&B phase, then sets the Z-indexing to be sensitive to whatever combination was detected.

The method is to use a DIO Port Read and peek at the state of the bits corresponding to the A & B phases wired into the counter you specify for your encoder. NOTE: You can NOT use counters 0 or 1 because their pins don't map to any of the 32 DIO. Your encoder will need to be wired to one of counters 2-7.

The vi I created to do this is called "Peek at A and B phases.vi" All the other vi's and controls in the attached llb can normally be found under your Labview directory at examples/daq/counter/n
i-tio.llb

One other note: The DIO port is configured for reading prior to configuring the encoder counter. I know some boards produce side effects when configuring the DIO port, but I don't know if the 6602 is one of them. I've just gotten into the habit of always configuring DIO first.

Good luck!

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 2
(3,205 Views)