Page 1 of 1
BL0011
Posted: Thu Dec 08, 2022 1:58 pm
by 783711
Trying to get a motor to work using the BL0011 board and flowcode v9. This is some example code that has been sent to me, but ive been having problems with thing compiling to hardware. Any help is appreciated.
Re: BL0011
Posted: Thu Dec 08, 2022 2:57 pm
by medelec35
Hello.
I have just tested the project file you uploaded.
On my BL0011 and Actuators board and all the motors are working as expected.
Therefore, there is no issue with the code that's preventing it from being compiled.
For when you do compile OK, Do you have an external power supply connected, and is the power LED on?
Is the switch nearest to the edge of the board fully in the ON position i.e towards the power connector?
If you are powering the Actuators board via the BL0011 then you will need to connect a wire going from the 5V to the 5-6v connector.
If you are only using USB to power the board, is it adequately rated?
The power light will dim if its a supply issue.
Can you post the
Code: Select all
BL0127 Actuators Demo Flowcode9.2 - Copy (4).msg.txt
please or if you have renamed your project, the project name.msg.txt file.
Re: BL0011
Posted: Fri Dec 09, 2022 11:25 am
by 803772
I believe this is the file you wanted
Re: BL0011
Posted: Fri Dec 09, 2022 11:38 am
by medelec35
Thank you for the file, yes that is the one I required.
Your compiler settings are for the PICkit programmer and not the Eblocks2, BL0011 Programmer.
Can you go to Bulid>Compiler options.
Select E-Blocks within the PIC section and make sure the Default compiler for the platform C for PIC is ticked.
Then compile to your hardware again.
Re: BL0011
Posted: Fri Dec 09, 2022 11:53 am
by 803772
I changed the compiler option and selected the box i needed to tick, as shown in the photo. Once i press Ok and then open back up the options, it still defaults to the previous option. I tried to compile again and got the error message shown below.
Re: BL0011
Posted: Fri Dec 09, 2022 11:58 am
by 803772
Nevermind, I realises i selected the wrong eblocks file, the code works as planned now. The only other thing i want to ask is , are there any files that can operate a DC motor on its own ?
Re: BL0011
Posted: Fri Dec 09, 2022 12:38 pm
by medelec35
You will need electronic components to drive a motor.
It depends if you want to control the motor in both directions then you will need an H-Bridge Motor Driver and you can use the DC Motor component.
Or if controlling in just one direction you could use a single transistor and a reversed biased diode for protection and use a PWM component to control the speed.
I would recommend designing hardware, then look at Flowocde to control the motor.
Or are you asking about controlling the motor on the actuators board?
Re: BL0011
Posted: Fri Dec 09, 2022 12:51 pm
by 803772
I mean about using the motor on the board without the other stepper or servo motor.
Re: BL0011
Posted: Mon Dec 12, 2022 7:19 am
by medelec35
Hello.
You will need the DC motor.
If you select the library ribbon, then click on the magnifying glass on the far left, a search window will pop up.
Enter a keyword like moto as partial words are accepted, then you will see DC motor on the list.