Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to read a value from the PLC and send it to SCADA.
PLC Programming
READ [1] FROM PLC INTO SCADA_BUFFER;Attempts:
3 left
💡 Hint
Common Mistakes
Using TIMER or COUNTER instead of REGISTER causes wrong data to be read.
✗ Incorrect
The PLC register holds the data to be read and sent to SCADA.
2fill in blank
mediumComplete the code to establish communication protocol between PLC and SCADA.
PLC Programming
SET COMMUNICATION_PROTOCOL TO [1];Attempts:
3 left
💡 Hint
Common Mistakes
Choosing HTTP or FTP which are not typical for PLC communication.
✗ Incorrect
MODBUS is a common protocol used for PLC-to-SCADA communication.
3fill in blank
hardFix the error in the code to correctly write data from SCADA to PLC.
PLC Programming
WRITE [1] TO PLC_REGISTER;Attempts:
3 left
💡 Hint
Common Mistakes
Using PLC_DATA or PLC_COMMAND causes writing wrong or no data.
✗ Incorrect
SCADA_DATA is the correct source to write into the PLC register.
4fill in blank
hardFill both blanks to create a filter that sends only values above 100 to SCADA.
PLC Programming
IF PLC_VALUE [1] 100 THEN SEND [2] TO SCADA;
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' sends values below 100, which is incorrect.
Sending SCADA_BUFFER instead of PLC_VALUE sends wrong data.
✗ Incorrect
The condition checks if PLC_VALUE is greater than 100, then sends PLC_VALUE to SCADA.
5fill in blank
hardFill all three blanks to create a dictionary mapping PLC registers to SCADA tags for values above zero.
PLC Programming
mapping = {{ [1]: [2] for [3] in PLC_REGISTERS if [2] > 0 }}Attempts:
3 left
💡 Hint
Common Mistakes
Using 'tag' as a key without defining it causes errors.
Mixing variable names causes syntax errors.
✗ Incorrect
We map each register to its value if the value is above zero. 'register' is the key, 'value' is the value, and 'register' is the loop variable.
