Component: SCADA (ECIO40P) (SCADA Slaves)
Author | Matrix TSL |
Version | 1.0 (Release) |
Category | SCADA Slaves |
Contents
- 1 SCADA (ECIO40P) component
- 2 Examples
- 3 Downloadable macro reference
- 4 Simulation macro reference
- 4.1 I2CInitialise
- 4.2 IOGetInputPin
- 4.3 UARTBaud
- 4.4 ADCSample8
- 4.5 UARTCheckRX
- 4.6 UARTInitialise
- 4.7 I2CRestart
- 4.8 PWMDisable
- 4.9 I2CReceive
- 4.10 I2CStart
- 4.11 SPITransfer
- 4.12 I2CStop
- 4.13 SPIPrescaler
- 4.14 PWMSetDuty
- 4.15 ADCSample10
- 4.16 IOSetOutputPin
- 4.17 UARTReceive
- 4.18 SPIInitialise
- 4.19 I2CSend
- 4.20 UARTSend
- 4.21 PWMSetPrescaler
- 4.22 PWMEnable
- 4.23 Initialise
- 5 Property reference
SCADA (ECIO40P) component
Connects to an ECIO40P running the SCADA ECIO40P Firmware allowing the board to become a slave to the flowcode simulation runtime. Supports: Digital IO / ADC / I2C / SPI / PWM / UART See Flowcode Help Wiki for firmware.
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
I2CInitialise
Initialise the I2C module ready for communications
Parameters
- This macro has no parameters
Return value
- This call does not return a value
IOGetInputPin
Sets the selected digital pin to an input and reads the input state.
Parameters
- BYTE Pin
- Range: 0-29
Return value
- BOOL : Returns true if the operation is a success, else false
UARTBaud
Control the communications rate of the UART module
Parameters
- BYTE Rate
- 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
Return value
- This call does not return a value
ADCSample8
Reads the voltage present on an Alanog pin as an 8-bit value range 0-255
Parameters
- BYTE ADCChannel
- Range: 0-12
Return value
UARTCheckRX
Check to see if the UART module has received any data
Parameters
- This macro has no parameters
Return value
UARTInitialise
Initialise the UART module ready for communications
Parameters
- This macro has no parameters
Return value
- This call does not return a value
I2CRestart
Put the I2C Module into Restart mode
Parameters
- This macro has no parameters
Return value
- This call does not return a value
PWMDisable
Disable a PWM output
Parameters
- BYTE Channel
- Range: 0-1
Return value
- This call does not return a value
I2CReceive
Receive a byte using the I2C bus
Parameters
- BOOL Last
- Last byte to receive: Range 0-1
Return value
I2CStart
Put the I2C Module into Start mode
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SPITransfer
Transfer a byte using the SPI bus
Parameters
- BYTE DataOut
Return value
I2CStop
Put the I2C Module into Stop mode
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SPIPrescaler
Modify the speed of the SPI bus
Parameters
- BYTE Prescaler
- Range: 0-2
Return value
- This call does not return a value
PWMSetDuty
Sets the duty for the PWM output
Parameters
- BYTE Channel
- Range: 0-5
- BYTE Duty
Return value
- This call does not return a value
ADCSample10
Reads the voltage present on an Alanog pin as an 10-bit value range 0-1023
Parameters
- BYTE ADCChannel
- Range: 0-12
Return value
IOSetOutputPin
Sets the selected digital pin to an output and assigns the output state.
Parameters
- BYTE Pin
- Range: 0-29
- BOOL State
- Range: 0-1
Return value
- This call does not return a value
UARTReceive
Receives a data byte from the UART.
Recommend calling the UARTCheckRx function first to ensure data is available.
Parameters
- This macro has no parameters
Return value
SPIInitialise
Initialsie the SPI module ready for communications
Parameters
- This macro has no parameters
Return value
- This call does not return a value
I2CSend
Transmit a byte using the I2C bus
Parameters
- BYTE DataOut
Return value
- BOOL : Returns true if the operation is a success, else false
UARTSend
Send a byte via the UART module
Parameters
- BYTE Data
- Data Byte to send. Range: 0-255
Return value
- This call does not return a value
PWMSetPrescaler
Sets the prescaler for the PWM output
Parameters
- BYTE Prescaler
Return value
- This call does not return a value
PWMEnable
Enable a PWM output
Parameters
- BYTE Channel
- Range: 0-1
Return value
- This call does not return a value
Initialise
Initialise the comms to the Arduino board ready for commands to be sent.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Property reference
Data Source
This property is of type Fixed list of ints and can be referenced with the variable name scada_uart1::DataSource.
Simulation data source used to allow the component to connect to various remote devices
Nothing - Simulation data is ignored
COM port - Routes the communication data to and from a physical or virtual COM port
Injector - Routes the communication data via a data injector component on the Panel.
COM Port
This property is of type Fixed list of ints and can be referenced with the variable name scada_uart1::com_port.
Lists all the current available COM port hardware on your PC.
Refresh Ports
This property is of type True or false and can be referenced with the variable name scada_uart1::RefreshPorts.
No additional information
Console Log
This property is of type True or false and can be referenced with the variable name ConsoleLog.
Create an automatic console log of the commands sent to the Arduino
Log Mode
This property is of type Fixed list of ints and can be referenced with the variable name LogMode.
Controls how the console data is formatted.
Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality
Command Log gives a more in depth analysis of the outgoing commands and incoming returns