Macro 1:
trigger b2 motion sensor
check if flag 2 is off (condition)
set flag 2
cam2 on
start recording
delay 30 seconds
stop recording
clear flag 2
Macro 2:
trigger b3 motion sensor
check if flag 2 is off (condition)
set flag 2
cam3 on
start recording
delay 30 seconds
stop recording
clear flag 2
Description: When macro 1 is triggered by b2 it checks the condition of flag2, if it is on macro 1 won't do anything since the condition of flag 2 is set. Basically in the macros above flag 2 set means that the system is recording.
If macro 1 is triggerd by b2 and flag 2 is cleared it will run, set flag 2 and record video for 30 seconds then stop and clear flag 2 so if trigger b3 fires it can record.
Same with macro 2, it will check the flag status and if macro 1 has set flag 2 macro 2 won't do anything, but if macro 1 isn't running then macro 2 will execute and record video.
You have 16 flags to play with. Like Bill said it's a good way to see if something or a macro was triggered or running. In the above example if macro one is already recording you wouldn't want to try to start another instance of recording. Flags keep that from happening.
That being said, they can get confusing and out of hand.
Hope I haven't confused you!