Strange problem with macro….
Moderator: Benj
Strange problem with macro….
Since so far I’ve already done 101 cross tests with different combination with different stepper motors and different drive boards in order to exclude the hardware problem. Also I've tested the Second damp macro alone but always with the same result the Second damp loose its holding power when the program has finished. I’m assuming that it’s a code problem....
Primary damp which works well I’ve measured from stepper motor pins 0=0V, 1=5V, 2=0V, 3=5V (this is a holding situation). Second damp’s all pins are 0 Volt. My basic question is how to make and leave the second damp’s pins high.
Hopefully there is somebody in a forum who can solve this problem.
Thanks in advanced for your help,
jjw
Primary damp which works well I’ve measured from stepper motor pins 0=0V, 1=5V, 2=0V, 3=5V (this is a holding situation). Second damp’s all pins are 0 Volt. My basic question is how to make and leave the second damp’s pins high.
Hopefully there is somebody in a forum who can solve this problem.
Thanks in advanced for your help,
jjw
- Attachments
-
- Lambda_Cont_pic16f877.fcf
- (46.96 KiB) Downloaded 307 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Strange problem with macro….
Hello,
Can you tell me what version of v5 you are using and could you also post up your C code generated by the Flowcode project so we can see what's going on behind the scenes.
Can you tell me what version of v5 you are using and could you also post up your C code generated by the Flowcode project so we can see what's going on behind the scenes.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Strange problem with macro….
I'm using Flowcode v.5.4.0.0 (03.08.2012). C code in appendix.
jjw
jjw
- Attachments
-
- Lambda_Cont_pic16f877.c
- (48.89 KiB) Downloaded 288 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Strange problem with macro….
Hello,
Is the chip continuing to run correctly or does it go dead when it tries to move motor 2?
Might be worth switching off the brown out configuration setting and seeing if this makes any difference.
Other then that the program seems to be ok. Might be worth updating to v5.5 and seeing if that makes and difference.
Is the chip continuing to run correctly or does it go dead when it tries to move motor 2?
Might be worth switching off the brown out configuration setting and seeing if this makes any difference.
Other then that the program seems to be ok. Might be worth updating to v5.5 and seeing if that makes and difference.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Strange problem with macro….
The chip is running correctly for hours no prob. I've already tried out brown out configuration nothing new...
The strange thing is that the Primary damp is working nicely and having strong holding power but the Second damp is not.....
I will update my Flowcode v.5.5.
jjw
The strange thing is that the Primary damp is working nicely and having strong holding power but the Second damp is not.....
I will update my Flowcode v.5.5.
jjw
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Strange problem with macro….
Hello,
Could it be an issue with PortD on the device your using? Have you tried more then one microcontroller just to see if it a hardware issue?
Could it be an issue with PortD on the device your using? Have you tried more then one microcontroller just to see if it a hardware issue?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Strange problem with macro….
I’ve been running the Second damp alone with three different chips in PortA nothing change. I’ve a brand new main board where I been running the program with pic16876 and pic18f252 with the same result. I think I’ve have excluded the hardware problem.
Just even updated to Flowcode v5.5 the question is how to proceed with it. The first tried out where I made I new hex file didn’t help…….
jjw
Just even updated to Flowcode v5.5 the question is how to proceed with it. The first tried out where I made I new hex file didn’t help…….
jjw
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Strange problem with macro….
Hello,
As a simple test what about swapping component connections for motor 0 and motor 1. Des the problem still occur with the motor connected to the second damp macro.
If the problem is still the same then the problem is probably not hardware related.
However the two motor components should be using identical code unless either motor's code has been customized (which I have checked and they are not) so the problem must be lurking somewhere in the flowchart code.
As a simple test what about swapping component connections for motor 0 and motor 1. Des the problem still occur with the motor connected to the second damp macro.
If the problem is still the same then the problem is probably not hardware related.
However the two motor components should be using identical code unless either motor's code has been customized (which I have checked and they are not) so the problem must be lurking somewhere in the flowchart code.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Strange problem with macro….
I’ve also cross tested component connections for motor 0 and motor 1 with the same result.
I was asking help for customizing flowchart code I’m totally confused how to do it.
jjw
I was asking help for customizing flowchart code I’m totally confused how to do it.
jjw
Re: Strange problem with macro….
I just made a brand new code with Flowcode 5.5 and tested how only the Second damp will conserve its holding force. Same result so I presume still that there is something wrong in Second damp’s macro.
jjw
jjw
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Strange problem with macro….
Hi jjw,
I have spotted whats happening by using Real Pic Simulator.
Will see what I can do for you.
Martin
I have spotted whats happening by using Real Pic Simulator.
Will see what I can do for you.
Martin
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Strange problem with macro….
This odd, as the secondary damper's drive waveform is not correct.
Also port D that's connected to stepper finish low which is also not correct.
That is the reason for the lack of holding power.
All the electromagnets are off.
Also port D that's connected to stepper finish low which is also not correct.
That is the reason for the lack of holding power.
All the electromagnets are off.
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Strange problem with macro….
Not saying this is it, but can you try this please.
- Attachments
-
- Lambda_Cont_pic16f877 test.fcf
- (46.97 KiB) Downloaded 323 times
Martin
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Strange problem with macro….
Your welcome jjw,
Just glad your up and running
Thanks for the update.
Martin
Just glad your up and running
Thanks for the update.
Martin
Martin