EasyManua.ls Logo

Pi-Plates DAQC2plate - Frequency Counter; Advanced Features and Special Modes; RGB LED and Interrupts

Default Icon
29 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4. Route the yellow wire to PWM Output 0 on the Extended Functions block (terminal 10)
5. Go into the Python interactive environment and import the DAQC2plate module by typing import
piplates.DAQC2plate as DAQC2
6. Assuming a DAQC2plate address of 0, type DAQC2.setPWM(0,0,50.0) to set the motor to
approximately half speed.
Frequency Counter
The DAQC2plate has an input dedicated to measuring the frequency of any ground referenced signal with a
amplitude in the range 3.3 to 5 volts. This can be used for simple bench measurements or as a tachometer for
a DC motor.
Specifications
Input Range: ground referenced signal can range from 3.3 to 5VDC.
Measurable Frequency Range: ~ 1.00 to 150Khz
Accuracy: ±2%
Input Hysteresis: 1.3V
Functions
getFREQ(addr) - returns the frequency of the attached signal as an integer value.
RGB LED
Each DAQC2plate has a general purpose RGB LED. At power up, this LED is set to white to indicate a
successful hardware initialization. However, you can use the LED functions below to change the color as you
see fit for your application.
Functions
addr must be in the range of 0 through 7
color values is a string that can be set to the following:
1. 'off'
2. 'red'
3. 'green'
4. 'yellow'
5. 'blue'
6. 'magenta'
7. 'cyan'
8. 'white'
setLED(addr,color) - turn on one of the LEDs in the bicolor LED package
getLED(addr) - returns a string value with the current LED color
Interrupts