UAT 202 Fundamentals of Automation Technology

Worksheet 5 Designing the battery-swap station

Lab 6 hAssesses CLO2, CLO3

Objective

Design the station sequence as a state machine, link devices with Modbus TCP, command a drone relay and draw the overall system

Equipment and materials

  • CODESYS with a simulated PLC and Modbus TCP server
  • Computer on the lab's internal network
  • ArduPilot SITL and a mission planner
  • Python and the module 5 example code

Safety

  • Simulation and internal network only; no real flights
  • Expose Modbus only on the lab network because the protocol has no authentication

Steps

  1. Write the state machine in SFC or ST as in Figure 1 with a timeout for each state
  2. Test normal, timeout in every state and emergency stop; compare with Example 1
  3. Start the Modbus TCP server and read registers from a PC program; check against Example 2
  4. Configure a relay in SITL, command DO_SET_RELAY in a mission and check the log
  5. Compute arm capacity with Example 4
  6. Draw how drone, station and mission system communicate and where emergency stops are needed

Record of results

Table 1 Testing the station state machine
Test caseEvent sequence (time s)Expected final stateActual final statePass?
Table 2 Modbus TCP register readout and relay state in SITL
ItemValue obtainedExpected or reference valueNotes
Record 3 Arm capacity calculation (Example 4) and notes on the system diagram

Questions

  1. Why must the FAULT state not exit automatically, and what should a person check before the station resumes?

  2. Classic Modbus has no authentication. What could a stranger on the PLC's network do, and how does your group's setup prevent it?

  3. From Record 3, how many drones can one station serve at no more than 80% arm utilisation? How many if the self-test grows to 30 s?

  4. In the system diagram, where are emergency stops needed, and why can a DO_SET_RELAY command from the drone not replace the station's emergency stop?

Check before you hand in

What to hand in

  • State-machine program and test table
  • Register readout and SITL log
  • Capacity calculation
  • System diagram with emergency-stop points

CLO2 Design basic control logic with PLCs or microcontrollers. CLO3 Relate industrial automation to UAS. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack