Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Customer Submitted Example
Contributor Name: Barry Jeapes
Contributor Company: Renishaw Plc
NI Supported: No
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Quadrature Encoder Simulator

1 ratings | 3.00 out of 5
Print

Downloads

Filename: quadratureencodersimulator.llb
Requirements: View

This VI generates finite or continuous quadrature encoder counts using a PXI-6602 counter/timer card. The VI has the followiing functions, selectable from the front panel;

- Reset
- Count UP to...
- Count DOWN to...
- Count UP continuously
- Count DOWN continuously
- Set Signals A & B (00)
- Set Signals A & B (01)
- Set Signals A & B (10)
- Set Signals A & B (11)

The code utilises 5 counters to simulate Quadrature Encoder Counts. No external connections are required between counters. Signal A appears on Pin 29 (CTR3 OUT). Signal B appears on Pin 26 (CTR4 OUT).

Counter 0 generates the timebase for the other three counters (via RTSI 1) and determines the rate at which the simulated quadrature encoder runs.

Counter 1 gates the timebase generator on CTR 0 (via RTSI 3), based on the number of rising edges of the timebaase have occured. This enables the Signal outputs to generate a finite number of counts.

Counter 2 is used as the gate for the counters 2 and 3 (via RTSI 2). It has a 25% duty cycle and is configured as 'Pulse Train Generation'.

Counters 3 and 4 generate Signals A and B respectively. They are configured as 'Retriggerable Pulse Generation' and pulse specifications set opposite to eachother to ensure the 90deg phase difference.

RTSI lines 1,2 and 3 are utilised in this function. Be sure that NO other devices are driving these RTSI lines.

Requirements


Filename: quadratureencodersimulator.llb

Software Requirements


Application Software: LabVIEW Full Development System 7.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Counter/Timers (TIO)
Hardware Model: PXI-6602
Driver: Traditional NI-DAQ (Legacy) 7.3

 
1 ratings | 3.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") has been made available by a third party, which is solely responsible for its content. National Instruments has not reviewed this program, does not support this program, and does not guarantee its quality in any way. NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS, STATUTORY OR IMPLIED, WITH RESPECT TO THIS PROGRAM, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT OF INTELLECTUAL PROPERTY, OR ANY OTHER WARRANTIES THAT MAY ARISE FROM USAGE OF TRADE OR COURSE OF DEALING. For details on terms of use or support of this program, please contact the code author or the site being referred at the top of this page. For further legal information, please visit http://ni.com/legal/termsofuse/unitedstates/us/.