Conditional Statements

The first thing to do is take the Command Code field out of the two groups. We'll decode the Command Code first, and then use IF clauses on the Set Actuator and Read Sensor groups to decide between them. IF clauses may be used on individual fields or on groups. The syntax is the same in both cases.