Genie18 Flowchart Output Command Issue

Thread Starter

BensonUTC

Joined Jan 10, 2025
2
Hello, I am looking for advice and guidance on a small project using a Genie18 Board and Microcontroller and the Circuit Wizard software. I have attached the flowchart here below, I am wondering why when my program reaches the High output command it registers as a stop command?

The system itself is a small barrier simulation where it must detect a person (A1), open using a motor (Q0) , show a green LED (Q7) when safe to enter, wait 5 seconds and then close using a motor (Q1) while showing a Red LED (Q6) when closing, the system also has an emergency stop (D2) that causes the gate to open with a red LED and then remain in a state of open until the emergency stop is released, then a reset button (D6) must be pushed to enable the system to begin again. The system also has a feature that detects if the gate is closed and if not closes the gate.

Any help would be appreciated

1736501373075.png
 

sagor

Joined Mar 10, 2019
1,049
No idea. The diagram does not show a "Stop" anywhere, so how could it reach one? One needs an idea as to what part of the code is running when it finds that "Stop" code in order to debug it.
Also your emergency stop is not very "reliable. In the loop where you wait 5 seconds before checking the stop again, it means that it could take up to 5 seconds for the emergency stop to take effect after someone enables it.
 

Thread Starter

BensonUTC

Joined Jan 10, 2025
2
The program always seems to 'stop' when attempting to give a High value to pin 07 to open the gate using the motor. Im wondering if the power supply simply cannot perform the function and I need a smaller motor.

The 5-Second delay between the gate open pin being high and low has been set by the time it takes the motor to turn 90 degrees to open or close the gate. is there a more suitable system?
 

sagor

Joined Mar 10, 2019
1,049
I don't know your hardware, but is Q0.7 valid as an output? Is it defined properly?
As for e-stop, I would simply have a smaller timing loop and count the number of loops, but checking the e-stop every time. For example, wait 1s only, but do it 5 times. Every 1s, you check the e-stop status and do the stop if it is set, ignoring the rest of the five 1s counters. To make it more responsive, do 1/2 sec wait loop, but 10 of them and check e-stop status every loop...
 
Top