Component: K8055D (3rd Party Equipment/Tools)
Author | Matrix Ltd |
Version | 2.3 (Release) |
Category | 3rd Party Equipment/Tools |
Contents
K8055D component
Support for the Velleman K8055 USB input/output board. Allows Flowcode to communicate with up to four K8055 boards, or to simulate them with interactive on-screen controls. All digital and analog I/O functions are supported.
Examples
No additional examples
Downloadable macro reference
GetCount
Read the value of the chosen counter for the currently selected board.
Parameters
- INT Counter
- The counter to read (1 or 2)
Return value
GetAnalogIn
Read analog input 1 or 2
Parameters
- INT Input
- Which input to read (1 ro 2)
Return value
SetAnalogOut
Sets the chosen analog output to the given value (0-255)
Parameters
- BYTE Output
- Which output to set the value for (1 ro 2)
- BYTE Value
- Value to set (0-255)
Return value
- This call does not return a value
SetDigitalOut
Sets the state of the output given by the output index (1 to 8)
Parameters
- BYTE Out
- Number of the output to set the value for
- BOOL Value
Return value
- This call does not return a value
GetDigitalByte
Read all five inputs at once, returning them as a bit pattern in a byte.
The upper three bits will always be zero.
Parameters
- This macro has no parameters
Return value
ResetCount
Resets the chosen counter of the currently selected board.
Parameters
- INT Counter
- Which counter to reset (1 or 2)
Return value
- This call does not return a value
GetDevices
Returns a value representing the available devices.
Device is a binary value where bit(N) set = device at address (N) is connected.
Parameters
- This macro has no parameters
Return value
Select
Selects the board address to send to and receive data from.
Echos the address if the selection is valid.
Returns -1 if there is no device available at that address.
Parameters
- INT Address
- The address off the board to be selected (0...3).
Return value
SetDigitalByte
Sets all eight digital outputs according to the individual bits of the Value parameter.
Parameters
- BYTE Value
- Value to send to the selected board.
Return value
- This call does not return a value
GetDigitalIn
Read the individual input at the given index (1..5)
Parameters
- INT Input
- Which input to read (1 to 5)
Return value
SetCountDebounce
Set the amount of time allowed for switches to settle before
being counted as a new event to count.
Parameters
- INT Counter
- Which counter to make a setting for (1 or 2)
- INT DebounceTime
- Settling time for switch debouncing in milliseconds
Return value
- This call does not return a value
Simulation macro reference
This component does not contain any simulation macros
Property reference
Addr 0
This property is of type True or false and can be referenced with the variable name SimAddr0.
Use software simulation to emulate a board connected at address 0.
Addr 1
This property is of type True or false and can be referenced with the variable name SimAddr1.
Use software simulation to emulate a board connected at address 1.
Addr 2
This property is of type True or false and can be referenced with the variable name SimAddr2.
Use software simulation to emulate a board connected at address 2.
Addr 3
This property is of type True or false and can be referenced with the variable name SimAddr3.
Use software simulation to emulate a board connected at address 3.
Scan
This property is of type Fixed list of ints and can be referenced with the variable name ScanNow.
Request a scan of the currently connected hardware to detect what Velleman boards are connected
and at what addresses.
Where hardware is not detected at an addess, a System Panel simulation will be used instead where one
has been requested in the properties.