3.2 Encoder Configuration
The program named 'vcio' can be used to setup the encoder. It provides usage information if no parameter is given. Sample usage instructions are provided here, but always refer to the instructions of your version:
08:11:57[root@VC-Z] ~ #vcio
VCIO v.1.2.2.- VCLinux Camera I/O Configuration and Connection Setup.
Usage: /tmp/vcio [-r MaxPos ] [-i Inc ] [-t time] [-a] [-b] [(-z | -e)] [-s] [-d] [-l] [-R] [-x]
-r | Define the encoder full-step resolution here, see encoder data sheet, if not defined, use default value of 2048. |
-i | After the counter increments this count of microsteps, a trigger signal is being invoked which can be utilized by defining TRGSRC_EXT as trigger source. The least significant two bits represent the subincrement step. Note that counter resets to zero do not affect the state of the subincrements, i.e. after a reset the counter value can be 0, 1, 2 or 3. If not defined, use default value of 1. |
-o | microstep offset for first trigger after calibration, first trigger occurs at microstep position increment (-i) plus offset (-o) plus 3. If not defined, use default value of 0. |
-a | Interprets the signal at the corresponding PLCIn as encoder signal NA. On activation, connection is then mandatory. |
-b | Interprets the signal at the corresponding PLCIn as encoder signal NB. On activation, connection is then mandatory. |
-z | Interprets the signal at the corresponding PLCIn as encoder signal Z. On activation, connection is then mandatory. The switches -z and -e may never be set simultaneously. |
-e | Turn on Trigger Warden: The trigger signal is suppressed until the corresponding PLCIn signal is high active. The switches -z and -e may never be set simultaneously. |
-s | Changes rotation direction (swaps signal A and B). |
-d | Turns off the encoder signal B. Beware that just using signal A as increment, jitter may be present. |
-l | Turn on Laser Warden: Laser is only activatable if the corresponding PLCIn is active. There are camera versions which do not allow the deactivation of the laser warden, and they act as if this parameter is always applied. |
-x | Put sensor trigger output signal also to gpio Nr. 3; only for custom OEM versions, otherwise the signal is inaccurate! |
-t | Time used to debounce encoder input source, default value: 10000. Time Unit is in FPGA Cycles. The FPGA clock frequency can be acquired by reading out the value of capt->sen->d.fpgaClkHz, e.g. 153846161 Hz. The default debouncing time for that example is then given by 10000 cycles / 153846161 Hz = 0.000065 s = 65 us. If not defined, use default value of 10000. |
-R | Suppresses reset of encoder hardware (GPIO Nr. 27, 28 and counter val- ue will then remain unchanged) |
Settings done cannot be read out. Different camera models may have different vcio parameters.
To actually use the trigger input source (assigned by the vcio program) you have to select it at your source code in your image capture struct by setting the capture trigger input source to TRGSRC_EXT (instead of TRGSRC_IMM for immediate trigger); refer to the libvclinux image acquisition documentation!
Default Settings for Wardens
Target | Default Value |
---|---|
Trigger Warden | Inactive |
Laser Warden | Inactive for cameras where the Laser Warden can be turned off, active else. |