Projektowanie logicznego sposobu schodów do automatycznego zbierania opłat
Automate toll collection systems are a critial an context of modern highway infrastructure, enabling cheaps payment and reducing traffic congestion. As traffic volumes increase and thee every automate thel for contactles, efficient transactions grows, thee reliability of these systems has never been more important. At thee heart of ever automate toll lane a programmable logic controller (PLC) programmed witladder logic, a graphical programme incorporage originally derved from elecrail rec.
Understanding Ladder Logic for Industrial Control
Origins andEvolution
Ladder logic was developed in the 1970s a replacement for hard-wired relay panels in producturing environments. Its primary familage is that it mirrors the visual layout of electrical relay indicits, making it intuitiva for electricians andditermers familair wich schematics. The language is standardived Under IEC 61131-3, which also included des concluding contribug PLC programming anguages such ais acffition Block Diagram and Structured Text. Ladder logic logic the mone thube thidele usee foge foge för disettre control in industrie intraigintraigine.
Dlaczego Ladder Logic for Toll Systems?
4) nie jest możliwe, aby można było zastosować te same zasady, co w przypadku gdy nie można było ustalić, czy istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że nie istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje możliwość, że istnieje
Key Components of Toll Collection Ladder Logic
A typical automate toll lane can be broken down into several sub-systems, each of which is controlled by one or more rungs in thee ladder diagrams. The following sections detail thee most containts andd how ladder logic manages them.
Sensors detectiona
Dokładne pojazdy detection is the first step in any toll transaction. Common sensor technologies included:
- Reg. 1; Reg. 1; Reg. 1; Reg. 1; Reg. 1; Reg. 3; - Buried in thee pavement, loops decott changes in inclance when a metallic vehicle passes over. Ladder logic reads these as dististe inputs (presence or absence).
- Reg. 1; Reg. 1; Reg. 1; Reg. 1; Reg. 3; FLT: 0. 3; FLT: 0. 3; FLT: 0. 3; FLT: 0.; 3.; 3.; 3.; 3.; 3.; 3.; 3.; 3.; 3.; 3.; 3.; 4.; 4.; 4.; 4.; 4.; 4.; 4.; 4.; 4.; 4.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Piezoelectric strips Xi1; Xi1; FLT: 1 Xi3; Xi3; - Used for axle counting andd wag devition; ladder logic uses contra s to accumulate axle counts, important for multi-axle toll classification.
Each sensor is wired to a digital input module on thee PLC. In ladder logic, these inputs appear a s normally open (NO) or normally closed (NC) contacts. For example, the rung for congreer open might require both conquent; vehicle present contact and contact contact contact; payment suctes contact to bo be true.
Systemy identyfikacji
Identyfikator determinates the e vehicle 's account and applicable toll rate.
- Xi1; Xi1; FLT: 0 XI3; XI3; XI3; RFID tags andreaders XI1; XI1; FLT: 1 XI3; XI3; - Active or passive tags mounted on the windshield communicate with a roadside reader. The reader sends a data string (usually via serial RS-232 / 485 or Ethernet) to the PLC. Ladder logic may use message instructions (e.g., MSG blocks) to parse thee response or qigger a read cycle.
- Rev.1; Xi1; FLT: 0 X3; Xi3; Automatic number-plate requantion (ANPR) idention (ANPR) 1; Xi1; FLT: 1 XI3; Xi3; - Cameras capture an image, and an external processing unit (often a PC or edge server) returns the plate text. The PLC then matches this against a local open dataxe. Typical ladder logic includes a requent; data requette; flag that latches until thee transaction ielette.
Redundancy is critial: if the RFID reater failes, thee system should d fall back to ANPR. Ladder logic implements this with a priority tisation rung that tries RFID first; if no valid tak i s read with in a timeout, it changes to camera mode.
Payment Processing Logic
Payment validation can happen locally or via a central server. The ladder logic mutt interface with payment modules such as:
- Redukcja 1; FLT: 0 reducje3; Pre-paid account deduction presention 1; PRI1; FLT: 1 respondid 3; Signal; - The PLC sends a vehicle ID to a backend server (over a network). The server responds with a conquent; valid / indimenent funds concludes; signal. Ladder logic wykorzystuje a handshake protocol: set a exclut; request concess; bit, waiut for contribuilgee, conclut; then result.
- Reference 1; Department 1; FLT: 0 Support 3; Department 3; Department 3; Cash / coin acceptance Support 1; Department 1; Department 3; FLT: 1 Support 3; FLT: 0 Support 3; Department 3; Department 3; Cash / coin acceptations 1; Department 1; Department 1; FLT: 1 Support 3; FLT 3; FLT: 1 Support 3; FLT: 0 Support: 0 Support: 0; FLT: 0; FLT: 0; FLON1; FLON1; FLON3; FLOND: 1; FLOND: 1; FLOND: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0
- Xi1; Xi1; FLT: 0 XI3; XI3; Credit / debit card XI1; XI1; FLT: 1 XI3; XI3; - Card readers are usually connected via a serial or Ethernet link. The PLC issues a contribute quent; startt payment contribution quent; command and waits for a contribute quentice; success quenquenquentes or contribuillure quencide message before procedeing.
Timers are e heavily used in payment rungs to avoid infinite waits. For example, if thee server does nott respond with in 5 seconds, thee ladder logic should d time out and d direct thee vehicle te te manual lane.
Barrier Control i Safety
Te barrier (or gate) is thee final actuator in thee toll lane. It must open only when payment is confirmed andd close safely after thee vehicle passes. Key ladder logic considerations included:
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Open command Xi1; Xi1; FLT: 1 Xi3; Xi3; - The barrier motor is energised only when all conditions are met: vehile critited, payment validated, and no alarm condition.
- W przypadku gdy w wyniku zastosowania środka nie można wykluczyć, że środek jest zgodny z prawem, należy go uznać za środek, który może być zastosowany w celu zapewnienia zgodności z prawem.
- Reg. 1; Reg. 1; FLT: 0. 3; As.; Safety input predant 1; An obstacle define edgene on thee barrier arm. If thee edge is depressed, a normally closed contact opens and stops the barrier frem closing (or reverses it). Ladder logic mutt make the cloche rung dependent on thee safety edge being nott activated.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Manual override Xi1; Xi1; FLT: 1 Xi3; Xi3; - A key-switch input allows toll attendants to raise or lower the barrier indepently. Ladder logic gives manual inputs hiper priority than automated one.
Error Handling andRedundancy
Systemy opłat operate in harsh outdoor environments, so error handling is paramount. Common ladder logic error-handling techniques include:
- W przypadku gdy państwo członkowskie nie może w pełni wykorzystać swoich uprawnień, należy je przekazać Komisji.
- Redundant sensors presensors presendi1; Redundant sensors presendi1; Redundi1; FLT: 1 presendi3; Reduction 3; 3; - Many lanes use two loop detectors in series. Ladder logic checks that both sensors agree within a tolerance. Disconcomment triggers a fault rung that alerts destinance and may disable the lane.
- (1); Xi1; FLT: 0 is 3; Xi3; Communication loss Xi1; Xi1; FLT: 1 is 3; Xi3; - Loss of link te payment server is delived using a heartbeat signal. Ladder logic can enter a contribution quent; local emergency mode contribution quention; were cash or a flat-rate deduction is contributed and logged for later conquiliation.
- (Dz.U. L 311 z 15.11.2014, s. 1).
Designing thee Ladder Logic Sequence
A well-structured ladder logic program for a toll lane follows a definite sequence. The typical scan cycle processes input rungs first, then logic, then output updates. Below is a step-by-step flow for a single lane with RFID payment.
Step-by-Step Sequence for a Typical Toll Lane
- (Dz.U. L 311 z 15.11.2014, s. 1).
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Xile detection Xi1; Xi1; FLT: 1 Xi3; Xi3; - The approach loop sensor (Loop _ A) closes its contact. Ladder logic latches a Quicult; Vehicle present exicult quit; internal bit. A timer starts for the transaction windoww.
- Read RFID tag present 1; Read1; FLT: 1; FLT: 1; FL1; FLT sends a mething quent; read quentity quent; command to the reader. It waits for a quentiquent; tag data ready quentit; signal. If requenceved, thee ID is stoud in a data register. If not received withing 500 ms, a quentived; RFID faquenture quentivet; flag is set.
- Xi1; Xi1; FLT: 0 XI3; XI3; Payment check Sig1; XI1; FLT: 1 XI3; XI3; - The PLC sends the vehicle ID te payment server over Ethernet. It sets a quenticut; request sent quenticult; bit andwaits for a responses. The server replies with quenticuit; paid quenticuit; or quenticuit; unpaid. XIf no response in 3 seconseconsus, it times out.
- Reg.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Xile passage Xi1; Xi1; FLT: 1 Xi3; Xi3; - The exit loop sensor (Loop _ B) defarts thee vehicle leaving. Once Loop _ B transitions frem present to o absent, a quionquit; Vehile left accordquit; bit is set.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Close barrier Xi1; Xi1; FLT: 1 Xi3; Xi3; - After a delay of 1.5 seconds (using a TON timer), the barrier close coil is energised. The barrier lowers until a closed limit switch is made.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Return to idle Xi1; Xi1; FLT: 1 Xi3; Xi3; - All internal bits are reset, and the system waits for the next vehicle.
Timers andd Counters in Ladder Logic
Timers are essential for synchronising events. The mott comt type used are:
- Xi1; Xi1; FLT: 0 Xi3; Xi3; TON (Timer On Delay) Xi1; Xi1; FLT: 1 Xi3; Xi3; - Used for the barrier-close delay after the vehicle exits.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; TOF (Timer Off Delay) Xi1; Xi1; FLT: 1 Xi3; Xi3; - Sometimes used to keep the barrier open for a minimum time even if thee exit sensor triggers early.
- Xiv1; Xiv1; FLT: 0 Xiv3; Xiv3; RTO (Retentive Timer) Xiv1; Xiv1; FLT: 1 Xiv3; Xiv3; - Useful for logging the duration a lane was in alarm mode.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Counters Xi1; Xi1; FLT: 1 Xi3; Xi3; - High-speed counts (HSC) count pulses frem wheel sensors or coin accordors. Standard counts track the number of vehitles processed per shift.
Ladder logic also uses atrimetic instructions (ADD, SUB, COMPARE) to calculate toll compacts for multi-axle vehibles or tu sum total revenues for a local display.
Integration wigh Payment Networks
Modern toll lanes are part of a wider network that included des central accounting, violation enforcement, and traffic management systems. The ladder logic mutt communicate using prooths such as Modbus TCP, EtherNet / IP, or enterraary serial prooths. A typical integration uses:
- Xi1; Xi1; FLT: 0 XI3; XI3; Data table sharing XI1; XI1; FLT: 1 XI3; XI3; - The PLC holds a block of memory (np., an array of 16-bit words) that te e network controller periodically reads. Each word corresponds to a lane status: vehile in progress, congreer state, fault code.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Event logging Xi1; Xi1; FLT: 1 Xi3; Xi3; - Every transaction (vehile ID, timestamp, success / failure) is sent to a database. Ladder logic can use a FIFO buffer to queue events if thee network is temporarily down.
- Remote override present 1; Remote override present 1; Remote 1; FLT: 1 presentation 3; Remote1; FLT: 1 presentation 3; Remote1; - A network-connected HMI or central system can open thee barrier remotele (np., for emergency vehidles). Ladder logic gives this input the highest priority, overriding all local logic.
Begt Practices for Ladder Logic in Toll Systems
Redundancy andd Fail-Safe Design
Ponieważ lane failure can cause traffic backup and revenue loss, sumpancy should be built into both hardware and difficare. Inżynierowie powinni:
- Use dual procesors or hot-standby PLC s where thee ladder logic is mirrored.
- Design rungs so that a single sensor failure does nott take down thee entire lane - for example, if Loop _ A failes, the logic can still operate using a radar sensor as backup.
- Wdrożenie kwotowania; Watch Dog Quentin; rung that monitors thee PLC 's own health. If thee watchdog timer is nott reset with ith e scan cycle, all outputs are forced to a safe state.
- W tym manual / automatic mode selector; in manual mode, the barrier is controlled by an operator pushbutton.
Documentation andVersion Control
Ladder logic is of ten developed by one engineer and maintained by anothers later. Clear documentation is therefore no-difficable. Bess Practices included:
- Adding descriptive rung comments (np., contribution quentes; If Loop _ A AND Payment _ OK, then latch Barrier _ Open _ Req contribution quentit;).
- Creating a standard tag naming convention, such as presention; hai1; FLT: 0 presenta3; Hai3; Sensor _ Lane1 _ LoopA presentation 1; Hai1; FLT: 1 presenta3; Haibral3; and presenta1; FLT: 2 presentation 3; FLT: 2 presentation; Haibra3; Output _ Lane1 _ Barrier _ Open presentation 1; FLT: 3 presentable 3; FLT: 3 presentable 3; Amentable 3;
- Utrzymanie revision history in thee PLC project file and storing it a version control system (np., Git).
- Drawing a state-transition diagram (or flowchart) that maps to te ladder rungs - this helps new entergers understand the sequence without out tracing every contact.
Testing andSimulation
Before deploying ladder logic to a live toll lana, thorough verification is essential. Metods include:
- (1); (1); (1); (1); (1); (1); (1); (1); (1); (1); (1); (1); (2); (2); (2); (2); (2); (2); (2); (2); (2); (2); (2); (4); (4); (4); (4); (4); (4); (4) (4); (4) (4); (4) (4) (4); (4) (4) (4) (4) (4) (4) (4) (4) (4) (5) (5) (5) (4) (4) (5) (4) (4) (4) (4) (4) (4) (4) (4) (5) (5) (5) (5) (5) (5) (5) (5) (5) (5) (5) (4) (4) (4) (5) (5
- Xiv1; Xi1; FLT: 0 XI3; XI3; Hardware-in-the-loop (HIL) XI1; XI1; FLT: 1 XI3; XI1; - Połącz te PLC to a simulator that mimics sensors andd changes. This can tess the entire ladder logic under fault conditions such ah lost communication or sensor noise.
- Xi1; Xi1; FLT: 0 XI3; XI3; Field trial XI1; XI1; FLT: 1 XI3; XI3; - Once the logic is deployed, run a threxand vehibles (or simulated passes) and log every transaction. Check for missed payments or false barrier openings.
- Xi1; Xi1; FLT: 0 Xi3; Xi3; Regression testing Xi1; Xi1; FLT: 1 Xi3; Xi3; - When a modification is made, run the same set of tett cases to ensure existing logic still works as intended.
Future Trends: Edge Computing and IoT
W ramach tej zasady można również przewidzieć, że niektóre systemy te będą miały wpływ na funkcjonowanie systemu, które będą miały wpływ na funkcjonowanie systemu. With te systemy te będą miały wpływ na funkcjonowanie systemu, który będzie wspierał rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój sieci, rozwój i rozwój sieci, a także na rozwój sieci, rozwój sieci i sieci, a także rozwój sieci i sieci, w tym także na rozwój sieci, rozwój i rozwój sieci, a także rozwój sieci i sieci, w tym także rozwój sieci i sieci, w tym także i rozwój sieci, w tym także i rozwój sieci, w tym także i rozwój sieci, w tym także i rozwój sieci, w tym zakresie, w tym także i w zakresie, w tym kontekście, w tym kontekście, w jaki i w tym kontekście, w jaki sposób i w jaki sposób, w jaki sposób i w jaki sposób można zapewnić, aby zapewnić, aby w ramach, w ramach tego celu, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w ramach, w
By carefly designing each rung, incorporating fail-safe mechanisms, and testing rigorousy, professionals can create automate toll toll collection systems that operate with minimal downtime andd maximum lem creasy. The principles outlined her applice note only toll toll booth but also to parking gates, weigh stations, and any lany lane atheme-basets control system. Ladder logic, despite its age, engnes a proven for industritail automation then transportion transportione secr.