NumericDisplay shows a number stored in a variable with a chosen format.
Indicator shows a colored light or symbol based on a variable's value.
Examples
Shows the temperature with one decimal place.
PLC Programming
NumericDisplay(Temperature, "0.0")
Shows the item count as a four-digit number with leading zeros.
PLC Programming
NumericDisplay(ItemCount, "0000")
Shows a green light if pressure is okay.
PLC Programming
Indicator(PressureOK, "Green")
Shows a red light if an alarm is active.
PLC Programming
Indicator(AlarmActive, "Red")
Sample Program
This program sets some example values and shows how to display them as numbers and indicators on a panel.
PLC Programming
PROGRAM NumericDisplayExample
VAR
Temperature : REAL := 23.7;
ItemCount : INT := 42;
PressureOK : BOOL := TRUE;
AlarmActive : BOOL := FALSE;
END_VAR
// Display temperature with one decimal
NumericDisplay(Temperature, "0.0");
// Display item count as4 digits
NumericDisplay(ItemCount, "0000");
// Show green indicator if pressure is OK
Indicator(PressureOK, "Green");
// Show red indicator if alarm is active
Indicator(AlarmActive, "Red");
END_PROGRAM
OutputSuccess
Important Notes
Formats like "0.0" control decimal places shown.
Indicators usually turn ON or OFF based on TRUE or FALSE values.
Always match variable types to display functions (e.g., REAL for decimals, INT for whole numbers).
Summary
Numeric displays show numbers clearly on control panels.
Indicators use colors or lights to show status.
Use formatting to control how numbers appear.
Practice
(1/5)
1. What is the main purpose of numeric displays in PLC programming?
easy
A. To control the power supply
B. To store data in memory
C. To show numbers clearly on control panels
D. To connect different devices
Solution
Step 1: Understand numeric displays
Numeric displays are designed to show numbers clearly so operators can read values easily.
Step 2: Identify the correct purpose
Among the options, only showing numbers clearly matches the function of numeric displays.
Final Answer:
To show numbers clearly on control panels -> Option C
Quick Check:
Numeric displays = show numbers clearly [OK]
Hint: Numeric displays always show numbers, not control or storage [OK]
Common Mistakes:
Confusing numeric displays with data storage
Thinking numeric displays control power
Mixing numeric displays with device connections
2. Which of the following is the correct syntax to display a numeric value on a PLC numeric display using a function called DisplayNumber with input value?
easy
A. DisplayNumber(value);
B. DisplayNumber = value;
C. DisplayNumber:value;
D. DisplayNumber->value;
Solution
Step 1: Identify function call syntax
In PLC programming, calling a function with an argument uses parentheses, like DisplayNumber(value);
Step 2: Check other options
Options A, B, and C use incorrect assignment or symbol syntax not valid for function calls.
Final Answer:
DisplayNumber(value); -> Option A
Quick Check:
Function call syntax uses parentheses [OK]
Hint: Function calls use parentheses with arguments [OK]
Common Mistakes:
Using assignment instead of function call
Using colon or arrow symbols incorrectly
Missing parentheses for function arguments
3. Given the following PLC code snippet, what will be the displayed output on the numeric display?
int temperature = 25;
DisplayNumber(temperature + 5);
medium
A. Error
B. 25
C. 5
D. 30
Solution
Step 1: Calculate the expression inside DisplayNumber
The code adds 5 to the variable temperature (25 + 5), resulting in 30.
Step 2: Understand DisplayNumber output
The function displays the calculated value, so the numeric display shows 30.
Final Answer:
30 -> Option D
Quick Check:
25 + 5 = 30 displayed [OK]
Hint: Add values before display function call [OK]
Common Mistakes:
Ignoring the addition operation
Assuming the display shows the variable only
Thinking the code causes an error
4. Identify the error in this PLC code snippet intended to display a numeric value:
int speed = 100
DisplayNumber(speed);
medium
A. Incorrect function name
B. Missing semicolon after variable declaration
C. Variable type is wrong
D. DisplayNumber cannot take variables
Solution
Step 1: Check syntax of variable declaration
The line int speed = 100 is missing a semicolon at the end, which is required.
Step 2: Verify function call correctness
The function call DisplayNumber(speed); is correct and uses the variable properly.
Final Answer:
Missing semicolon after variable declaration -> Option B
Quick Check:
Semicolon missing after int declaration [OK]
Hint: Always end statements with semicolon [OK]
Common Mistakes:
Forgetting semicolon after declarations
Assuming function name is wrong
Thinking variables can't be passed to functions
5. You want to display a temperature value with one decimal place on a numeric display in a PLC program. Which approach correctly formats the number before display?
To show one decimal place, rounding the float to 1 decimal is needed.
Step 2: Evaluate options
Only round(temp, 1) correctly rounds to one decimal place. temp + 0.1 (temp + 0.1) changes the value, B (int(temp)) removes decimals, D (floor(temp)) truncates down.
Final Answer:
round(temp, 1) -> Option A
Quick Check:
Rounding to 1 decimal = round(temp, 1) [OK]
Hint: Use round(value, decimals) to format numbers [OK]
Common Mistakes:
Using int() which removes decimals
Adding small values instead of rounding
Using floor() which truncates without rounding
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.