Urgent Assistance Needed: Issue with Motor Control in Program

Use this section to discuss your embedded Flowcode projects.
Post Reply
Posts: 1
Joined: Mon Oct 30, 2023 11:57 am

Urgent Assistance Needed: Issue with Motor Control in Program

Post by AmaanKhan »

I am currently working on a project involving a DC motor, and I am facing a significant issue with the program. I have outlined the details of my program below:

When switch one is pressed, the red LED should light up, indicating a wait time of 10 seconds.
After 10 seconds, the red light should turn off, and the green light should turn on, indicating that the lift doors can open.
When switch number 2 is pressed, the green light should turn off, the LCD should display that level 1 has been selected, and immediately the motor should start, lasting for 10 seconds. Then, the motor should stop, the LCD should be cleared, and there should be a delay of 2 seconds. Finally, the green light should be displayed, indicating that the doors are safe to open.

I am encountering difficulties with step number 3. Although I am able to turn off the motor after 10 seconds, it does not stop, and the LED displays that the doors can be opened, even though the motor is still running. This is a critical issue, as it contradicts the intended functionality of the program.

I have extensively searched through various blogs and resources, but none have provided a solution to this specific problem. As this project is crucial and will be part of an upcoming exam, I am reaching out to seek your urgent assistance in resolving this issue.
Flowcode Unit 6.fcfx
(19.13 KiB) Downloaded 30 times

Matrix Staff
Posts: 1373
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 488 times
Been thanked: 440 times

Re: Urgent Assistance Needed: Issue with Motor Control in Program

Post by medelec35 »

Sorry, we can only help with component or Flowcode bugs as this is for an exam.
The only hint I can give is use the Motor component function macros (Break, Forwards, Set Speed etc) to control the motor, not the output to D0 or D1.
If we helped with your Flowchart that will be classed as cheating.
Teachers/lectures read these forums, so, it could lead to an automaic fail.

Matrix Staff
Posts: 1197
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 158 times
Been thanked: 266 times

Re: Urgent Assistance Needed: Issue with Motor Control in Program

Post by Steve-Matrix »

The simulation of the motor component has "acceleration" and "deceleration" settings which show how fast and slow the motor starts and stops. If these are set to zero, the motor simulation will start and stop immediately. Otherwise, the motor simulation will take time to speed up and slow down when it is started/stopped.

Post Reply