Urgent Assistance Needed: Issue with Motor Control in Program

Use this section to discuss your embedded Flowcode projects.
Post Reply
AmaanKhan
Posts: 1
http://meble-kuchenne.info.pl
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.
Attachments
Flowcode Unit 6.fcfx
(19.13 KiB) Downloaded 109 times

medelec35
Matrix Staff
Posts: 1451
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 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.
Martin

Steve-Matrix
Matrix Staff
Posts: 1253
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 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