- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The motor assembly includes a limit switch that operates in both the top and bottom positions
also switches in the lower end position (closed in the end positions, during the
Motor drive open).
The first task:
The motor should be run up and down 1000 times and on each run the limit switch must open and close again. Depending on the test result, a red or green LED should be switched on.
I have already defined my macros
#define LOW
#define HIGH
#define LED_GREEN_ON LedGreen_Write(HIGH);
#define LED_GREEN_OFF LedGreen_Write(LOW);
#define LED_RED_ON LedRed_Write(HIGH)
#define LED_RED_OFF LedRed_Write(LOW);
#define MOTOR_UP {MotorDown_Write(LOW);\
MotorUp_Write(HIGH);}
#define MOTOR_DOWN {MotorUp_Write(LOW);\
MotorDown_Write(HIGH);}
#define MOTOR_STOP {MotorUp_Write(LOW);\
MotorDown_Write(LOW);}
#define READ_END_POS EndPosition_Read()
Please help me in approaching this problem. I have to use psoc creator.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @revolution
Could you let us know exactly what kind of a motor control algorithm you are looking for ?
As you may be knowing, there are several motor control algorithms and knowing what you are looking for is important. Also, various other factors need to be considered before developing the code like the type of the motor, motor parameters, motor rating, control architecture that you want to use.
Before developing the motor control algorithm, please consider preparing a plan for the motor controller considering all the aspects some of which are mentioned above.
If you need any specific help on any issue that you face, I will be happy to help you
Thanks and regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @revolution
Could you let us know exactly what kind of a motor control algorithm you are looking for ?
As you may be knowing, there are several motor control algorithms and knowing what you are looking for is important. Also, various other factors need to be considered before developing the code like the type of the motor, motor parameters, motor rating, control architecture that you want to use.
Before developing the motor control algorithm, please consider preparing a plan for the motor controller considering all the aspects some of which are mentioned above.
If you need any specific help on any issue that you face, I will be happy to help you
Thanks and regards