Bird
Raised Fist0
PLC Programmingscripting~10 mins

PLC-to-SCADA communication in PLC Programming - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to read a value from the PLC and send it to SCADA.

PLC Programming
READ [1] FROM PLC INTO SCADA_BUFFER;
Drag options to blanks, or click blank then click option'
ATIMER
BDATA
CREGISTER
DCOUNTER
Attempts:
3 left
💡 Hint
Common Mistakes
Using TIMER or COUNTER instead of REGISTER causes wrong data to be read.
2fill in blank
medium

Complete the code to establish communication protocol between PLC and SCADA.

PLC Programming
SET COMMUNICATION_PROTOCOL TO [1];
Drag options to blanks, or click blank then click option'
AMODBUS
BSMTP
CFTP
DHTTP
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing HTTP or FTP which are not typical for PLC communication.
3fill in blank
hard

Fix the error in the code to correctly write data from SCADA to PLC.

PLC Programming
WRITE [1] TO PLC_REGISTER;
Drag options to blanks, or click blank then click option'
ASCADA_DATA
BPLC_DATA
CSCADA_COMMAND
DPLC_COMMAND
Attempts:
3 left
💡 Hint
Common Mistakes
Using PLC_DATA or PLC_COMMAND causes writing wrong or no data.
4fill in blank
hard

Fill 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;
Drag options to blanks, or click blank then click option'
A>
B<
CPLC_VALUE
DSCADA_BUFFER
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' sends values below 100, which is incorrect.
Sending SCADA_BUFFER instead of PLC_VALUE sends wrong data.
5fill in blank
hard

Fill 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 }}
Drag options to blanks, or click blank then click option'
Aregister
Bvalue
Dtag
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'tag' as a key without defining it causes errors.
Mixing variable names causes syntax errors.

Practice

(1/5)
1. What is the main purpose of PLC-to-SCADA communication?
easy
A. To program the PLC hardware directly
B. To replace the PLC with a SCADA system
C. To allow remote control and monitoring of machines
D. To connect two PLCs without a SCADA system

Solution

  1. Step 1: Understand the role of PLC and SCADA

    PLC controls machines locally, SCADA monitors and controls remotely.
  2. Step 2: Identify communication purpose

    Communication enables SCADA to read data and send commands to PLC for remote control.
  3. Final Answer:

    To allow remote control and monitoring of machines -> Option C
  4. Quick Check:

    PLC-to-SCADA communication = remote control and monitoring [OK]
Hint: Think: Who controls and who monitors remotely? [OK]
Common Mistakes:
  • Confusing PLC programming with communication
  • Thinking SCADA replaces PLC
  • Assuming PLCs communicate without SCADA
2. Which of the following is a common protocol used for PLC-to-SCADA communication?
easy
A. Modbus
B. FTP
C. HTTP
D. SMTP

Solution

  1. Step 1: Recall common industrial communication protocols

    Modbus and OPC UA are widely used for PLC-to-SCADA data exchange.
  2. Step 2: Identify correct protocol from options

    Modbus is a standard protocol for PLC communication; HTTP, FTP, SMTP are not typical for this use.
  3. Final Answer:

    Modbus -> Option A
  4. Quick Check:

    Industrial protocol for PLC-SCADA = Modbus [OK]
Hint: Industrial control uses Modbus, not web or email protocols [OK]
Common Mistakes:
  • Choosing HTTP thinking it's for all network communication
  • Confusing FTP or SMTP with control protocols
  • Not knowing Modbus is designed for industrial use
3. Given this PLC script snippet reading a SCADA command:
IF SCADA_Command = 1 THEN
  Motor_Start := TRUE;
ELSE
  Motor_Start := FALSE;
END_IF;

What will be the value of Motor_Start if SCADA_Command is 0?
medium
A. Error
B. TRUE
C. 1
D. FALSE

Solution

  1. Step 1: Analyze the IF condition

    The condition checks if SCADA_Command equals 1; if true, Motor_Start is TRUE.
  2. Step 2: Evaluate with SCADA_Command = 0

    Since 0 is not equal to 1, ELSE branch runs, setting Motor_Start to FALSE.
  3. Final Answer:

    FALSE -> Option D
  4. Quick Check:

    SCADA_Command=0 means Motor_Start=FALSE [OK]
Hint: IF equals 1? No? Then FALSE [OK]
Common Mistakes:
  • Assuming Motor_Start stays TRUE by default
  • Confusing numeric 0 with TRUE
  • Expecting error due to zero value
4. Identify the error in this PLC-to-SCADA communication snippet:
IF SCADA_Status = TRUE THEN
  Alarm := TRUE
ELSE
  Alarm := FALSE;
END_IF;
medium
A. Missing semicolon after Alarm := TRUE
B. Incorrect use of ELSE statement
C. SCADA_Status should be compared to 1, not TRUE
D. END_IF is not needed

Solution

  1. Step 1: Check statement syntax

    Each assignment must end with a semicolon in PLC languages.
  2. Step 2: Locate missing semicolon

    Alarm := TRUE line lacks a semicolon at the end, causing syntax error.
  3. Final Answer:

    Missing semicolon after Alarm := TRUE -> Option A
  4. Quick Check:

    Semicolon missing after assignment = syntax error [OK]
Hint: Every assignment needs a semicolon [OK]
Common Mistakes:
  • Ignoring missing semicolon errors
  • Thinking ELSE syntax is wrong
  • Confusing boolean TRUE with numeric 1
5. You want to send a temperature value from PLC to SCADA every 5 seconds using Modbus. Which approach is best?
hard
A. Send temperature as a string message over HTTP every 5 seconds
B. Write temperature to a Modbus register and update it every 5 seconds
C. Use SCADA to poll the PLC once and never update
D. Send temperature only when it changes, ignoring timing

Solution

  1. Step 1: Understand Modbus data exchange

    Modbus uses registers to hold data; PLC writes values, SCADA reads them.
  2. Step 2: Choose update method for regular timing

    Writing temperature to a register and updating every 5 seconds ensures SCADA gets fresh data regularly.
  3. Final Answer:

    Write temperature to a Modbus register and update it every 5 seconds -> Option B
  4. Quick Check:

    Regular register update = reliable Modbus communication [OK]
Hint: Use Modbus registers for periodic data updates [OK]
Common Mistakes:
  • Using HTTP which is not standard for PLC-Modbus
  • Polling only once misses updates
  • Ignoring timing causes stale data
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard