CCST 44 — Loop Current vs Process Variable Check
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
Sign up to play this scenario →Already have an account? Log in
Not ready for Pro? Try a free scenario like this →
Briefing
During a loop check, the technician simulates a process value at the transmitter with a calibrator and reads the loop current at the PLC. SIM_PCT is the simulated value, 0 to 100 percent of range. MEASURED_MA_X100 is the current the PLC sees, in hundredths of a milliamp (400 = 4.00 mA). Build the check table row: - EXPECTED_MA_X100: the current a healthy loop should carry for that percent. The signal runs 4-20 mA, so 0 percent is 4.00 mA and 100 percent is 20.00 mA. - POINT_PASS: the measured current is within +/-1 percent of span (+/-0.16 mA, which is 16) of the expected current. The limit includes its edge. - POINT_FAIL: the measured current is outside that band. Exactly one of POINT_PASS and POINT_FAIL is on. A comparison cannot be written against a negative number, such as | (A > -5) |. To test a negative reading, flip its sign first with SUB(0, X) and compare the flipped value with a positive limit. Maths is built with Math boxes (ADD, SUB and MUL), or in the Code tab one assignment per line. Comparisons are built with Compare boxes, or in the Code tab as contacts, for example | (A > B) | := LAMP ;
Objectives
- EXPECTED_MA_X100 follows the simulated percent: 400 at 0, 800 at 25, 2000 at 100
- A measurement within +/-0.16 mA of expected passes, high or low, edge included
- A measurement outside the band, including a dead 0 mA loop, fails
Hints
- A loop check compares what you measured against what a healthy loop should give. Work out the expected value first, then judge the difference.
- Each percent of the range moves the current by the same amount, starting from the live-zero bottom. How much current is one percent worth?
- The difference between measured and expected can be either sign. The pass band is a window either side of zero, and its edges count as inside.
- Try 0 percent with 402 (pass), 75 percent with 1640 (fail), 100 percent with 1984 (pass) and 1983 (fail), and 0 percent with 0 (fail).
I/O Table
Inputs
SIM_PCTSimulated process value, 0-100 percent
INT · %IW0
MEASURED_MA_X100Measured loop current, hundredths of a milliamp (400 = 4.00 mA)
INT · %IW1
Outputs
EXPECTED_MA_X100Expected loop current for the simulated value
INT · %QW0
POINT_PASSMeasured current is within tolerance
BOOL · %Q0.0
POINT_FAILMeasured current is outside tolerance
BOOL · %Q0.1
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #10 percent, 4.02 mA → pass
A small error passes
- #225 percent, 8.00 mA → pass
An exact reading passes
- #350 percent, 11.90 mA → pass
A low reading inside the band passes
- #475 percent, 16.40 mA → fail
A high reading outside the band fails
- #5100 percent: 19.84 passes, 19.83 fails
The band edge is inside the band
- #60 percent, 0.00 mA → fail
A dead loop is not a zero reading
- #710 percent → expects 5.60 mA
The expected value follows the simulated percent
Related scenarios
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
Sign up to play this scenario →Already have an account? Log in
Not ready for Pro? Try a free scenario like this →