Dc Motor start stop and reverse

For general Flowcode discussion that does not belong in the other sections.
Post Reply
BAC-ITSUPPORT
Posts: 6
http://meble-kuchenne.info.pl
Joined: Fri Nov 19, 2021 12:09 pm

Dc Motor start stop and reverse

Post by BAC-ITSUPPORT »

Hi

I am using BL0011 programmer and trying to run the DC motor on the E-Blocks 2 board 0127. I need the motor to start forwards for 5 seconds and then stop for 5 seconds and then reverse. Whilst the simulation runs correctly to a degree it is returning an error when downloading to the micro. Can you please help. I have attached the file which is using flowcode 9.


Thanks

Nev
Attachments
Flowcode Motor.fcfx
(9.55 KiB) Downloaded 174 times

medelec35
Matrix Staff
Posts: 1610
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 567 times
Been thanked: 531 times

Re: Dc Motor start stop and reverse

Post by medelec35 »

Hello.
Your flowchart compiles for me OK, but the connections to the motor are wrong.
You will also need to select Full bridge if you want the motor to also go in reverse.
With the connections, the motor is connected to pins 1 and 2:
DC Motor connections.png
DC Motor connections.png (17.77 KiB) Viewed 2618 times
You can determine the correct connections from the Eblocks2 datasheet.
I have attached an example just using a DC motor and the BL0127 Actuators Demo Flowcode9.
As for the error either Flowcode is not up-to-date or you have not got the required MECHATRONICS component pack, if the 30days trial has ended?
To update Flowcode, select Help, Library Updates...
Change the Files in-use to full database
If any components have been updated, you will need to select Reload for the effects to take place.
To see what pack you have installed, select Help, Licensing, View
Check that the Mechatronics has not got a red cross on it.
When you compile a flowchart, a file will be generated within the project folder ending in .msg.txt
E.g. Flowcode Motor.msg.txt
Can you attach the file so we can get a better idea of what is causing the flowchart compile failure?
you will need to Select Full Editor & Preview
Attachments
Flowcode Motor Example.fcfx
(11.04 KiB) Downloaded 196 times
BL0127 Actuators Demo Flowcode9.fcfx
(25.66 KiB) Downloaded 161 times
Martin

BAC-ITSUPPORT
Posts: 6
Joined: Fri Nov 19, 2021 12:09 pm

Re: Dc Motor start stop and reverse

Post by BAC-ITSUPPORT »

Hi

I have updated files as you suggested and noted that the mechatronics pack does not have a red x. I have modified the motor to pins Port B1 and Port B2 the programme now compiles but the hardware i.e the motor does not respond. I have sent a photo of the set up in which the BL0127 board ic connected to port b and a copy of your modified file
Attachments
Motor Setup flowcode.docx
(105.87 KiB) Downloaded 167 times
Flowcode Motor Example.fcfx
(13.94 KiB) Downloaded 180 times

medelec35
Matrix Staff
Posts: 1610
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 567 times
Been thanked: 531 times

Re: Dc Motor start stop and reverse

Post by medelec35 »

In the flowchart you posted, there are two motor components added.
I have deleted motor_full_bridge2 and compiled to my hardware and the motor on my actuators board is working as expected.
Can you make sure your hardware is being programmed and running OK by running a one-second flasher.
If the one-second flasher is working then can you take a picture of your hardware powered up?
Have you got a lead going from 5V of the BL0011 (or an external supply) to 5V-6V of the Actuators board?
If not, the motor won't run.
With power going to the board the Power LED should light.
Is the ON/OFF switch fully to the right?
Martin

BAC-ITSUPPORT
Posts: 6
Joined: Fri Nov 19, 2021 12:09 pm

Re: Dc Motor start stop and reverse

Post by BAC-ITSUPPORT »

Hi

Legend all sorted thank you very much for your time

Thanks again

medelec35
Matrix Staff
Posts: 1610
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 567 times
Been thanked: 531 times

Re: Dc Motor start stop and reverse

Post by medelec35 »

You're welcome.
Thank you for letting us know you are all sorted.
Martin

Post Reply