06-28-2018 10:30 AM - edited 06-28-2018 10:31 AM
Hello Arduino Users,
I am have problem with controlling the direction.
I have four stepper motors and they works fine in terms of speed, acceleration but in terms of direction the first and the third one they works ( i can control the direction by introducing a negative number) for the second and the fourth stepper they don't it's really weird and i don't know what's i am going to do to solve this problem.
Please check the attachment below for the Vi file.
I will be appreciate any kind of contribution.
Thanks.
08-15-2018 03:57 AM
[Sam Kristoff on digilent forum]
There is a potential for issues when using 'Stepper Wait Till Steps Complete' with multiple steppers. It looks like the firmware sums the distance remaining for all steppers and then the LabVIEW side checks if it's not equal to 0. If one stepper has positive x steps to go and another stepper has negative x steps to go the VI would report that there are no steps remaining and the VI would unblock.
If you're only using a single stepper that shouldn't be a problem, but it is something to be aware of.
case 0x33: // Stepper steps to go
retVal = 0;
for(int i=0; i<8; i++){
retVal += steppers[i].distanceToGo();
}
Serial.write( (retVal & 0xFF) );
Serial.write( (retVal >> 8) );