Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define the communication protocol for PLC data exchange.
PLC Programming
COMM_PROTOCOL := [1];Attempts:
3 left
💡 Hint
Common Mistakes
Choosing HTTP or FTP which are not typical for PLC communication.
Using SMTP which is for email, not PLC data exchange.
✗ Incorrect
Ethernet/IP is a common protocol used for PLC-to-PLC communication in industrial networks.
2fill in blank
mediumComplete the code to set the PLC communication timeout value in milliseconds.
PLC Programming
PLC_Comm.Timeout := [1];Attempts:
3 left
💡 Hint
Common Mistakes
Setting timeout too low causing premature disconnections.
Setting timeout too high causing delays in error detection.
✗ Incorrect
A timeout of 5000 milliseconds (5 seconds) is a typical setting for PLC communication to avoid long waits.
3fill in blank
hardFix the error in the code to correctly send a data packet from one PLC to another.
PLC Programming
SendDataPacket(PLC1, [1]);Attempts:
3 left
💡 Hint
Common Mistakes
Using parentheses which calls the function instead of passing the variable.
Passing the wrong variable name.
✗ Incorrect
The function expects a variable reference, not a function call, so 'DataBuffer' is correct.
4fill in blank
hardFill both blanks to configure the PLC communication port and baud rate.
PLC Programming
PLC_Comm.Port := [1]; PLC_Comm.BaudRate := [2];
Attempts:
3 left
💡 Hint
Common Mistakes
Using a port name that does not exist on the PLC.
Setting an unsupported baud rate.
✗ Incorrect
COM1 is a common default port and 9600 is a standard baud rate for PLC serial communication.
5fill in blank
hardFill all three blanks to create a dictionary mapping PLC IDs to their IP addresses for communication setup.
PLC Programming
PLC_IPs := { [1]: [2], [3]: "192.168.1.20" };Attempts:
3 left
💡 Hint
Common Mistakes
Using IP addresses as keys instead of values.
Mixing up keys and values in the dictionary.
✗ Incorrect
PLC_A and PLC_B are keys, with their respective IP addresses as values in the dictionary.
