Component: Injector (SCADA Slave Analog Input) (Comms Data Injectors)
Author | Matrix Ltd |
Version | 1.2 (Release) |
Category | Comms Data Injectors |
This inherits from Data Injector Template |
Contents
Injector (SCADA Slave Analog Input) component
Data injector to allow a physical analog input pin to be attached to a simulated component. The component will poll for any input state changes via SCADA Slave enabled hardware. Enabling the Flowcode simulation runtime to directly interface with a physical I/O pin.
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
This component inherits simulation macros from Data Injector Template
InitialiseInjector
Sets up the injector ready to receive commands or send data
Parameters
- <- STRING InjectorName
- Name of the console that will be created
- This parameter may be returned back to the caller
Return value
RxByteCount
Returns the number of bytes currently sat in the receive buffer.
This call is provided by Data Injector Template
Parameters
- This macro has no parameters
Return value
TxByte
Puts a byte onto the comms channel.
Parameters
- BYTE DataByte
Return value
- This call does not return a value
RxByte
Attempt to receive a byte back from the injector
0 - 255 = Valid data
256 = RX timeout no data available
Parameters
- This macro has no parameters
Return value
GetTxConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
This call is provided by Data Injector Template
Parameters
- This macro has no parameters
Return value
ChangeState
Sets the state of the bus.
SPI - Controls the chip select pin
I2C - Controls the start/restart/stop status
Parameters
- BYTE State
- SPI: 0=CSLow, 1=CSHigh I2C: 0=Stop, 1=Start, 2=Restart, 3=LastRx
Return value
- This call does not return a value
GetRxConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
This call is provided by Data Injector Template
Parameters
- This macro has no parameters
Return value
GetConsoleHandle
Gets the handle to the console allowing data displaying on the panel etc.
Parameters
- This macro has no parameters
Return value
Property reference
SCADA Slave
This property is of type Panel object and can be referenced with the variable name SCADASlave.
SCADA Slave component to use to pipe data to a physical SPI bus
Number of Pins
This property is of type Fixed list of ints and can be referenced with the variable name NumPins.
Specifies the number of pins the component can monitor and control.
Poll Rate
This property is of type Fixed list of ints and can be referenced with the variable name PollRate.
No additional information
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin0.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin0.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin1.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin1.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin2.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin2.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin3.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin3.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin4.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin4.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin5.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin5.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin6.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin6.
Pin used by the connected SCADA Slave hardware
Simulation ADC Pin
This property is of type Single analog pin and can be referenced with the variable name Pin7.
Pin monitored by the simulation
SCADA Slave ADC Pin
This property is of type Unsigned integer and can be referenced with the variable name SCADA_Pin7.
Pin used by the connected SCADA Slave hardware