Thank you for your reply - I had not thought of sleep... I will try this after I have correcting the drive roller problem on my machine.
I can also tie the reset to my POR which will hold the chip in reset for about the time that I need. I can also make many do nothing calls to use up time.
I would like to know why I am getting this reaction for future situations - I don't like not knowing the reason for such a bug.
"erratic" - The program jumps to ANY point in the exe up with no halt
down twice
2 - 5 correct cycles
back to up with no halt
double feeds
a complete mess
and that one command is the cause
remove it and the machine responds correctly for hundreds of cycles!!! - I just got the drive roller trued up and tested the machine again - I am now at 94 SPM with the pinch roller out of round - this machine is a copy of the orininal prototype that will cycle at 130 SPM
It is very frustrating to see a copy of my work NOT perform correctly!
Thank you for your intrest in my problem
P.S. I do have proper loads on all I/O lines and noise is not an issue - This is self evident
Thank you for your time,
Tomorrow is a new day - I will solve this problem - I normally do this sort of thing totally on my own - I really do like the fact that you want to help. The chip defaults to input on all pins so that should not matter - pause is the problem - I will try to resolve the issue.
I am not trying to sound like I know a lot about code but I have programmed at binary level to and from the parallel port for years on another project and have been able to resolve all questions so far - this sounds like a stack over run issue in C but with no crash so how can the device keep going randomly after the first miss step?
The program now functions correctly without the beginning pause BUT it takes the ram up PAST the flag only at power up. If I stop the sequence using the E STOP and re-start everything works fine - very stable - for thousands of cycyes - I want my demo unit to perfom as well as my patented controller - perfect the first time and every time
All pins are by default inputs as the program starts up. It may help to set pins that will be outputs to a neutral state right at the top. That appears to be pins p0 to p4. Something like,
OUTS = %00000000 ' outputs will be low, or whatever is best
DIRS = %00011111 ' p0 to p4 are outputs, p5 to p7 inputs
Comments
I can also tie the reset to my POR which will hold the chip in reset for about the time that I need. I can also make many do nothing calls to use up time.
I would like to know why I am getting this reaction for future situations - I don't like not knowing the reason for such a bug.
Steve
Inserting valid PAUSE as first code line in Main: should not alter your program execution only delay it.
However, using SLEEP will a) not insert delay of 1.2 seconds ( see minimal time of SLEEP command)
b) create "problem" with I/O ( if not taken into count/consideration) - again - see command description.
Just to make sure - your I/O lines have pull-up / pull - down resistors, right?
·
Have you got it tied high (or low) via a resistor to get a known state?
Maybe the PAUSE lets the pin float in your design putting unknown factors in place.
down twice
2 - 5 correct cycles
back to up with no halt
double feeds
a complete mess
and that one command is the cause
remove it and the machine responds correctly for hundreds of cycles!!! - I just got the drive roller trued up and tested the machine again - I am now at 94 SPM with the pinch roller out of round - this machine is a copy of the orininal prototype that will cycle at 130 SPM
It is very frustrating to see a copy of my work NOT perform correctly!
Thank you for your intrest in my problem
P.S. I do have proper loads on all I/O lines and noise is not an issue - This is self evident
Look, I am actually clutching at straws here since I am baffled as you are.
Tomorrow is a new day - I will solve this problem - I normally do this sort of thing totally on my own - I really do like the fact that you want to help. The chip defaults to input on all pins so that should not matter - pause is the problem - I will try to resolve the issue.
I am not trying to sound like I know a lot about code but I have programmed at binary level to and from the parallel port for years on another project and have been able to resolve all questions so far - this sounds like a stack over run issue in C but with no crash so how can the device keep going randomly after the first miss step?
The program now functions correctly without the beginning pause BUT it takes the ram up PAST the flag only at power up. If I stop the sequence using the E STOP and re-start everything works fine - very stable - for thousands of cycyes - I want my demo unit to perfom as well as my patented controller - perfect the first time and every time
Thank you
Steve
OUTS = %00000000 ' outputs will be low, or whatever is best
DIRS = %00011111 ' p0 to p4 are outputs, p5 to p7 inputs
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com