AP&C API Reference
|
The device class that wraps up the DLP IO20 command set. More...
Public Member Functions | |||||||||||
IO20 (IntPtr handle, uint id, uint flags, Ftdi.Ftdi.FT_DEVICE_TYPE deviceType, uint locationId, string serialNumber, string description) | |||||||||||
Initializes a new instance of the IO20 class. More... | |||||||||||
IO20 (Ftdi.Ftdi.FtdiDevice device) | |||||||||||
Initializes a new instance of the IO20 class. More... | |||||||||||
WhyBool | Reset () | ||||||||||
Resets this instance by opening and closing the connection. This also resets the ReadErrors property to zero. More... | |||||||||||
WhyBool | Ping () | ||||||||||
Performs an echo message with the IO20. More... | |||||||||||
WhyBool | FlashLed () | ||||||||||
Flashes the IO20 D1 LED. More... | |||||||||||
void | TurnLedOn () | ||||||||||
Turns the IO20 D1 LED on. More... | |||||||||||
WhyBool | TurnLedOff () | ||||||||||
Turns the IO20 D1 LED off. More... | |||||||||||
WhyBool | ControlRelay (byte relayNumber, bool reset) | ||||||||||
Sets or resets the relay identified by relayNumber . More... | |||||||||||
WhyBool | SetDigitalOutput (byte channel, bool outputLow) | ||||||||||
Controls the digital output. More... | |||||||||||
bool | GetDigitalInput (byte channel) | ||||||||||
Gets the digital input from channel . More... | |||||||||||
WhyBool | ControlEventCounter (byte channel, bool triggerOnFallingEdge) | ||||||||||
Enables and clears the event counter on channels RB6 aor RB7. More... | |||||||||||
uint | ReadEventCounter (byte channel) | ||||||||||
Reads the event counter from channel . More... | |||||||||||
ulong | DetectTemperatureSensor (byte channel) | ||||||||||
Detects the temperature sensor on channel and if one exists provides the serial number More... | |||||||||||
byte[] | ReadTemperatureSensor (byte channel, bool convertFirst) | ||||||||||
Reads the temperature sensor, optionally requesting a conversion first. If the data read succeeds, a new conversion is directly performed, but reads spaced apart in time will require the conversion to provide accurate data. More... | |||||||||||
WhyBool | SetTemperatureSensorResolution (byte channel, byte resolution) | ||||||||||
Sets the temperature sensor resolution to:
| |||||||||||
int | ReadAnalogInput (byte channel) | ||||||||||
Reads the analog input for channel , which will be a 10-bit number presenting 0-5 volts (nominal), which would be about .0048 volts per each increment of the value (ie: 1 = .0048 volts, 2 = .0097 volts, etc). More... | |||||||||||
int[] | ReadAllAnalogInputs () | ||||||||||
Reads all analog inputs, 0 - 13. More... | |||||||||||
![]() | |||||||||||
FtdiDevice (IntPtr handle, uint id, uint flags, FT_DEVICE_TYPE deviceType, uint locationId, string serialNumber, string description) | |||||||||||
FT_STATUS | SetTimeouts (uint readTimeoutMs, uint writeTimeoutMs) | ||||||||||
FT_STATUS | SetLatencyTimer (byte ms) | ||||||||||
FT_STATUS | Open () | ||||||||||
Transitions the communications with the device to an open state. More... | |||||||||||
FT_STATUS | Close () | ||||||||||
FT_STATUS | Write (byte[] command) | ||||||||||
FtdiResponse | Read (uint bytesToRead, int retryCount) | ||||||||||
FtdiResponse | ReadUsingQueue (uint bytesToRead, int queueCheckDelay) | ||||||||||
FT_STATUS | Purge (FT_PURGE flags) | ||||||||||
override string | ToString () | ||||||||||
Additional Inherited Members | |
![]() | |
IntPtr | Handle [get] |
uint | Id [get] |
uint | LocationId [get] |
uint | Flags [get] |
FT_DEVICE_TYPE | DeviceType [get] |
string | SerialNumber [get] |
string | Description [get, set] |
byte | LatencyTimer [get, set] |
uint | UsbTimeout [get, set] |
uint | ReadErrorResetTrigger [get, set] |
Gets or sets the read error reset trigger, which determines how many consecutive read errors are allowed before a connection reset is tried. More... | |
uint | ReadErrors [get, set] |
Gets or sets the current number of read errors. More... | |
bool | IsOpen [get] |
Determines if the device is open or not based on Flags. More... | |
bool | IsHighSpeedUsb [get] |
Determines if the device is high-speed USB (true ) or full-speed USB (false ). More... | |
The device class that wraps up the DLP IO20 command set.
|
inline |
Initializes a new instance of the IO20 class.
handle | The handle. |
id | The id. |
flags | The flags. |
deviceType | Type of the device. |
locationId | The location id. |
serialNumber | The serial number. |
description | The description. |
|
inline |
Initializes a new instance of the IO20 class.
device | The device. |
|
inline |
Enables and clears the event counter on channels RB6 aor RB7.
channel | The channel. |
triggerOnFallingEdge | if set to true then the event count is triggered on the falling edge, otherwise it is triggered on the rising edge. |
Apac.Ftdi.DeviceNotOpenException | Will be thrown if the device is not open. |
System.ArgumentOutOfRangeException | Will be thrown if channel does not specify 6 or 7. |
|
inline |
Sets or resets the relay identified by relayNumber .
relayNumber | The relay to set, either 1 or 2. Any other value will cause and ArgumentOutOfRangeException. |
reset | true indicates the relay will be reset, false indicates it will be set. |
|
inline |
Detects the temperature sensor on channel and if one exists provides the serial number
channel | The channel to be tested for temperature sensor. |
Apac.Ftdi.DeviceNotOpenException | Will be thrown if the device is not open. |
System.ArgumentOutOfRangeException | Will be thrown if channel is not between 0 and 13, inclusive. |
Apac.Ftdi.Ftdi.FtdiException | Will be thrown if a communication error occurs. |
System.Exception | Will be thrown if a short circuit or data always low condition is detected on the line. |
|
inline |
Flashes the IO20 D1 LED.
|
inline |
Gets the digital input from channel .
channel | The channel. |
true
if the digital input is high and false
if the digitial input is low.Ftdi.Ftdi.FtdiException | Will be thrown if any communication error occurs, which is commands that do not return any data from the device. |
|
inline |
Performs an echo message with the IO20.
|
inline |
Reads all analog inputs, 0 - 13.
|
inline |
Reads the analog input for channel , which will be a 10-bit number presenting 0-5 volts (nominal), which would be about .0048 volts per each increment of the value (ie: 1 = .0048 volts, 2 = .0097 volts, etc).
channel | The channel to be read. |
Apac.Ftdi.DeviceNotOpenException | |
System.ArgumentOutOfRangeException | channel |
Apac.Ftdi.Ftdi.FtdiException |
|
inline |
Reads the event counter from channel .
channel | The channel. |
Apac.Ftdi.DeviceNotOpenException | Will be thrown if the device is not open. |
System.ArgumentOutOfRangeException | Will be thrown if channel is not 6 or 7. |
Apac.Ftdi.Ftdi.FtdiException | Will be thrown if some communication error occurs. |
|
inline |
Reads the temperature sensor, optionally requesting a conversion first.
If the data read succeeds, a new conversion is directly performed, but reads spaced apart in time will require the conversion to provide accurate data.
channel | The channel. |
convertFirst | if set to true [convert first]. |
Apac.Ftdi.DeviceNotOpenException | |
System.ArgumentOutOfRangeException | channel |
Apac.Ftdi.Ftdi.FtdiException |
|
inline |
Resets this instance by opening and closing the connection. This also resets the ReadErrors property to zero.
DeviceNotOpenException |
|
inline |
Controls the digital output.
channel | The channel to be controlled. |
outputLow | If asOutput is false , then this parameter will be ignored. Otherwise, if outputLow is true then the digital output will be set low and if it is false the digital output will be set high. |
|
inline |
Sets the temperature sensor resolution to:
Bit Count | Details |
---|---|
9 | 0.5 ° C, taking 94 ms to convert (max) |
10 | 0.25 ° C, taking 188 ms to convert (max) |
11 | 0.125 ° C, taking 375 ms to convert (max) |
12 | 0.0625 ° C, taking 750 mS to convert (max) |
channel | The channel to be configured. |
resolution | The resolution to be set with valid values being 9-12 (0x09-0x0C). |
Apac.Ftdi.DeviceNotOpenException | |
System.ArgumentOutOfRangeException | will be thrown if either channel or resolution is out of bounds. |
|
inline |
Turns the IO20 D1 LED off.
|
inline |
Turns the IO20 D1 LED on.