starting my C program, any guidance would be appreciated. - Page 8


Page 8 of 10 FirstFirst ... 5678910 LastLast
Results 141 to 160 of 199

Thread: starting my C program, any guidance would be appreciated.

  1. #141
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    The Console Screen
    What doesn't make sense to me is why the Spindle CW, CCW, or OFF button starts the program running. You were supposed to assign the program to the S Action. Not the M3, M4, M5 buttons.
    This is how their Configured. Bit 159 will activate as soon as I initiate the program regardless if S calls to speed up or down, even if Bit 158 is active.

    Quote Originally Posted by TomKerekes View Post
    Please post your Tool Setup | M0-M30 Actions so we can see how you configured them.
    I also included my Init. file. maybe I did something wrong setting up the Spindle DAC7

    Attached Thumbnails Attached Thumbnails starting my C program, any guidance would be appreciated.-screenshot-71-jpg  


  2. #142
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Init File
    Code:
    #include "KMotionDef.h"
    
    
    // Note Low Gains, Limited Max Limits, No Limit Options, No Soft Limits,
    // Large allowed Following Error, No Feed Forward, No Filters, etc
    
    void main()
    {	
    	ch0->InputMode=ENCODER_MODE;
    	ch0->OutputMode=DAC_SERVO_MODE;
    	ch0->Vel=30000;
    	ch0->Accel=25000;
    	ch0->Jerk=100000;
    	ch0->P=11.5;
    	ch0->I=0.0002;
    	ch0->D=1;
    	ch0->FFAccel=0.0002;
    	ch0->FFVel=0.0001;
    	ch0->MaxI=2047;
    	ch0->MaxErr=1000;
    	ch0->MaxOutput=2047;
    	ch0->DeadBandGain=1;
    	ch0->DeadBandRange=0;
    	ch0->InputChan0=0;
    	ch0->InputChan1=1;
    	ch0->OutputChan0=0;
    	ch0->OutputChan1=1;
    	ch0->MasterAxis=-1;
    	ch0->LimitSwitchOptions=0x12c;
    	ch0->LimitSwitchNegBit=136;
    	ch0->LimitSwitchPosBit=136;
    	ch0->SoftLimitPos=1e+09;
    	ch0->SoftLimitNeg=-1e+09;
    	ch0->InputGain0=1;
    	ch0->InputGain1=1;
    	ch0->InputOffset0=0;
    	ch0->InputOffset1=0;
    	ch0->OutputGain=1;
    	ch0->OutputOffset=0;
    	ch0->SlaveGain=0;
    	ch0->BacklashMode=BACKLASH_OFF;
    	ch0->BacklashAmount=1;
    	ch0->BacklashRate=10;
    	ch0->invDistPerCycle=1;
    	ch0->Lead=5;
    	ch0->MaxFollowingError=1000;
    	ch0->StepperAmplitude=250;
    
    	ch0->iir[0].B0=0.570375;
    	ch0->iir[0].B1=-1.07753;
    	ch0->iir[0].B2=0.508907;
    	ch0->iir[0].A1=1.91629;
    	ch0->iir[0].A2=-0.918042;
    
    	ch0->iir[1].B0=1;
    	ch0->iir[1].B1=0;
    	ch0->iir[1].B2=0;
    	ch0->iir[1].A1=0;
    	ch0->iir[1].A2=0;
    
    	ch0->iir[2].B0=1;
    	ch0->iir[2].B1=0;
    	ch0->iir[2].B2=0;
    	ch0->iir[2].A1=0;
    	ch0->iir[2].A2=0;
    
    	ch1->InputMode=ENCODER_MODE;
    	ch1->OutputMode=DAC_SERVO_MODE;
    	ch1->Vel=40000;
    	ch1->Accel=70000;
    	ch1->Jerk=100000;
    	ch1->P=6;
    	ch1->I=0.0003;
    	ch1->D=1;
    	ch1->FFAccel=0.0004;
    	ch1->FFVel=0.0054;
    	ch1->MaxI=500;
    	ch1->MaxErr=100000;
    	ch1->MaxOutput=2047;
    	ch1->DeadBandGain=1;
    	ch1->DeadBandRange=0;
    	ch1->InputChan0=1;
    	ch1->InputChan1=1;
    	ch1->OutputChan0=1;
    	ch1->OutputChan1=1;
    	ch1->MasterAxis=-1;
    	ch1->LimitSwitchOptions=0x110;
    	ch1->LimitSwitchNegBit=138;
    	ch1->LimitSwitchPosBit=138;
    	ch1->SoftLimitPos=1e+09;
    	ch1->SoftLimitNeg=-1e+09;
    	ch1->InputGain0=1;
    	ch1->InputGain1=1;
    	ch1->InputOffset0=0;
    	ch1->InputOffset1=0;
    	ch1->OutputGain=1;
    	ch1->OutputOffset=0;
    	ch1->SlaveGain=0;
    	ch1->BacklashMode=BACKLASH_OFF;
    	ch1->BacklashAmount=0;
    	ch1->BacklashRate=0;
    	ch1->invDistPerCycle=1;
    	ch1->Lead=11;
    	ch1->MaxFollowingError=100000;
    	ch1->StepperAmplitude=250;
    
    	ch1->iir[0].B0=1;
    	ch1->iir[0].B1=0;
    	ch1->iir[0].B2=0;
    	ch1->iir[0].A1=0;
    	ch1->iir[0].A2=0;
    
    	ch1->iir[1].B0=1;
    	ch1->iir[1].B1=0;
    	ch1->iir[1].B2=0;
    	ch1->iir[1].A1=0;
    	ch1->iir[1].A2=0;
    
    	ch1->iir[2].B0=1;
    	ch1->iir[2].B1=0;
    	ch1->iir[2].B2=0;
    	ch1->iir[2].A1=0;
    	ch1->iir[2].A2=0;
    
    	ch2->InputMode=ENCODER_MODE;
    	ch2->OutputMode=DAC_SERVO_MODE;
    	ch2->Vel=60000;
    	ch2->Accel=40000;
    	ch2->Jerk=200000;
    	ch2->P=12;
    	ch2->I=0.0001;
    	ch2->D=1;
    	ch2->FFAccel=0.0001;
    	ch2->FFVel=0.0009;
    	ch2->MaxI=2047;
    	ch2->MaxErr=1000;
    	ch2->MaxOutput=2047;
    	ch2->DeadBandGain=1;
    	ch2->DeadBandRange=0;
    	ch2->InputChan0=2;
    	ch2->InputChan1=1;
    	ch2->OutputChan0=2;
    	ch2->OutputChan1=1;
    	ch2->MasterAxis=-1;
    	ch2->LimitSwitchOptions=0x11c;
    	ch2->LimitSwitchNegBit=137;
    	ch2->LimitSwitchPosBit=137;
    	ch2->SoftLimitPos=1e+06;
    	ch2->SoftLimitNeg=-1e+06;
    	ch2->InputGain0=1;
    	ch2->InputGain1=1;
    	ch2->InputOffset0=0;
    	ch2->InputOffset1=0;
    	ch2->OutputGain=-1;
    	ch2->OutputOffset=0;
    	ch2->SlaveGain=0;
    	ch2->BacklashMode=BACKLASH_OFF;
    	ch2->BacklashAmount=0;
    	ch2->BacklashRate=0;
    	ch2->invDistPerCycle=1;
    	ch2->Lead=5;
    	ch2->MaxFollowingError=10000;
    	ch2->StepperAmplitude=250;
    
    	ch2->iir[0].B0=1;
    	ch2->iir[0].B1=0;
    	ch2->iir[0].B2=0;
    	ch2->iir[0].A1=0;
    	ch2->iir[0].A2=0;
    
    	ch2->iir[1].B0=1;
    	ch2->iir[1].B1=0;
    	ch2->iir[1].B2=0;
    	ch2->iir[1].A1=0;
    	ch2->iir[1].A2=0;
    
    	ch2->iir[2].B0=1;
    	ch2->iir[2].B1=0;
    	ch2->iir[2].B2=0;
    	ch2->iir[2].A1=0;
    	ch2->iir[2].A2=0;
    	
    	ch7->InputMode=ENCODER_MODE;
    	ch7->OutputMode=DAC_SERVO_MODE;
    	ch7->Vel=0.5;
    	ch7->Accel=1;
    	ch7->Jerk=5;
    	ch7->P=0;
    	ch7->I=0;
    	ch7->D=0;
    	ch7->FFAccel=0;
    	ch7->FFVel=2047;
    	ch7->MaxI=2047;
    	ch7->MaxErr=1e+10;
    	ch7->MaxOutput=2047;
    	ch7->DeadBandGain=1;
    	ch7->DeadBandRange=0;
    	ch7->InputChan0=7;
    	ch7->InputChan1=1;
    	ch7->OutputChan0=7;
    	ch7->OutputChan1=1;
    	ch7->MasterAxis=-1;
    	ch7->LimitSwitchOptions=0x100;
    	ch7->LimitSwitchNegBit=0;
    	ch7->LimitSwitchPosBit=0;
    	ch7->SoftLimitPos=1e+09;
    	ch7->SoftLimitNeg=-1e+09;
    	ch7->InputGain0=1;
    	ch7->InputGain1=1;
    	ch7->InputOffset0=0;
    	ch7->InputOffset1=0;
    	ch7->OutputGain=-1;
    	ch7->OutputOffset=0;
    	ch7->SlaveGain=1;
    	ch7->BacklashMode=BACKLASH_OFF;
    	ch7->BacklashAmount=0;
    	ch7->BacklashRate=0;
    	ch7->invDistPerCycle=1;
    	ch7->Lead=0;
    	ch7->MaxFollowingError=10000000000;
    	ch7->StepperAmplitude=250;
    
    	ch7->iir[0].B0=1;
    	ch7->iir[0].B1=0;
    	ch7->iir[0].B2=0;
    	ch7->iir[0].A1=0;
    	ch7->iir[0].A2=0;
    
    	ch7->iir[1].B0=1;
    	ch7->iir[1].B1=0;
    	ch7->iir[1].B2=0;
    	ch7->iir[1].A1=0;
    	ch7->iir[1].A2=0;
    
    	ch7->iir[2].B0=1;
    	ch7->iir[2].B1=0;
    	ch7->iir[2].B2=0;
    	ch7->iir[2].A1=0;
    	ch7->iir[2].A2=0;
    
    
    	EnableAxis(0);
    	EnableAxis(1);
    	EnableAxis(2);
    	EnableAxis(7);
     
    	DefineCoordSystem(2,1,0,7);	// define XYZU axes
    }




  3. #143
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I assume SpindleSpeed.c is the program I posted? Please post your M3, M4 and M5 programs. I can't see a reason the ONCW, ONCCW, or OFF buttons would run the program I posted. It should only run with an S GCode. Did you do an S command?

    I don't see anything in the Init that would effect the bits. But axis 7 is only being used to read the spindle encoder. For that the axis doesn't need to be enabled. It also should not be included in the Coordinated Motion System as axis A. But that would interfere with the solenoid bits,

    What do you see in the Console Screen after an S Command with the Spindle on?

    Regards
    TK http://dynomotion.com


  4. #144
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    I assume SpindleSpeed.c is the program I posted?
    Yes, that's what I saved it as.
    Quote Originally Posted by TomKerekes View Post
    Did you do an S command?
    Yes, I't responds the same way by not deactivating Bit 159.

    Quote Originally Posted by TomKerekes View Post
    Axis 7 is only being used to read the spindle encoder. For that the axis doesn't need to be enabled. It also should not be included in the Coordinated Motion System as axis A. But that would interfere with the solenoid bits,
    I'll clear those parts.

    My Spindle Deffinitions:
    Code:
    #define SPINDLEAXIS 7			// Axis Channel to Jog to rotate Spindle
    #define FACTOR (10000/60.0)  	// to convert RPM to counts/sec (counts/rev / 60.0sec)
    #define SPINDLECW_BIT 154   	// bit to activate to cause CW rotation
    #define SPINDLECCW_BIT 155		// bit to activate to cause CCW rotation
    #define SPINDLEBREAK_BIT 157	// bit to activate/deactivate spindle break
    #define SPEEDVAR 99				// global persistant variable to store latest speed
    #define STATEVAR 98				// global persistant variable to store latest state (-1=CCW,0=off,1=CW)
    #define KMVAR PC_COMM_CSS_S 	// variable KMotionCNC will pass speed parameter (113)
    #define USE_POS_NEG_VOLTAGE 0 	// 0 = output Magnitude, 1 = output positive and negative speed
    This code is used to ClearBit (activates) and SetBit (deactivates) the spindle break (Bit157).
    Code:
    #include "KMotionDef.h"
    
    #include "MySpindleDefs.h"
    
    
    // desired speed is passed from KMotionCNC in variable KMVAR
    // save in user variable STATEVAR whether it was off, CW, or CCW (0,1,-1)
    // save in user variable SPEEDVAR the last desired speed
    
    main()
    {
    	// spin down
    	ClearBit(SPINDLECW_BIT);
    	ClearBit(SPINDLECCW_BIT);
    	ClearBit(Coolant);
    	Delay_sec(0.5);
    	ClearBit(SPINDLEBREAK_BIT);
    	printf("Jogging Spindle Stop\n");
    	persist.UserData[STATEVAR] = 0;  // remember we are Off
    	while (!CheckDone(SPINDLEAXIS)) ;
    }
    lets me turn on spindle CCW
    Code:
    #include "KMotionDef.h"
    
    #include "MySpindleDefs.h"
    
    int   *css_mode = &persist.UserData[PC_COMM_CSS_MODE];			// Mode 1=Normal RPM mode. 2=CSS
    
    // desired speed is passed from KMotionCNC in variable KMVAR
    // save in user variable STATEVAR whether it was off, CW, or CCW (0,1,-1)
    // save in user variable SPEEDVAR the last desired speed
    
    main()
    {
    	float speed = *(float *)&persist.UserData[SPEEDVAR];  // value stored is actually a float 
    	float LastState = persist.UserData[STATEVAR];  // get last state 
    	
    	if (LastState==1)  
    	{
    		// if spindle was CW now we want CCW 
    		// spin down
    		
    		ClearBit(SPINDLECW_BIT);
    		ClearBit(SPINDLECCW_BIT);
    		Jog(SPINDLEAXIS,0);
    		while (!CheckDone(SPINDLEAXIS)) ;
    	}
    	
    	// turn spindle on CCW and ramp to new speed
    	SetBit(SPINDLECCW_BIT);
    	SetBit(SPINDLEBREAK_BIT);
    	
    	LastState = -1;
    	persist.UserData[STATEVAR] = -1;  // remember we are CCW
    }
    Lets me turn on Sindle CW.
    Code:
    #include "KMotionDef.h"
    
    #include "MySpindleDefs.h"
    
    int   *css_mode = &persist.UserData[PC_COMM_CSS_MODE];			// Mode 1=Normal RPM mode. 2=CSS
    
    // desired speed is passed from KMotionCNC in variable KMVAR
    // save in user variable STATEVAR whether it was off, CW, or CCW (0,1,-1)
    // save in user variable SPEEDVAR the last desired speed
    
    main()
    {
    	float speed = *(float *)&persist.UserData[SPEEDVAR];  // value stored is actually a float 
    	float LastState = persist.UserData[STATEVAR];  // get last state 
    	
    	if (LastState==1)  
    	{
    		// if spindle was CW now we want CCW 
    		// spin down
    		
    		ClearBit(SPINDLECW_BIT);
    		ClearBit(SPINDLECCW_BIT);
    		Jog(SPINDLEAXIS,0);
    		while (!CheckDone(SPINDLEAXIS)) ;
    	}
    	
    	// turn spindle on CCW and ramp to new speed
    	SetBit(SPINDLECCW_BIT);
    	SetBit(SPINDLEBREAK_BIT);
    	
    	LastState = -1;
    	persist.UserData[STATEVAR] = -1;  // remember we are CCW
    }




  5. #145
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    What do you see in the Console Screen after an S Command with the Spindle on?
    DesiredRPM = 500.000000, CurrentRPM = -777.137634
    Could it be that CurrentRPM in registering Neg?

    What controls the Stop button in KmotionCNC? I need to add something to stop the spindle.

    Last edited by Gunmachinist; 02-27-2021 at 01:19 PM.


  6. #146
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Very good. Try changing:

    Code:
            CurrentRPM = Spindle.TrueSpeedRPS * 60.0;
    to

    Code:
            CurrentRPM = fast_fabs(Spindle.TrueSpeedRPS * 60.0);


    You can assign an additional Action to the Stop button as described here.

    Regards
    TK http://dynomotion.com


  7. #147
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I am getting somewhere. I placed two of the wires in the encoder wrong so now the speed actually counts + instead of -. I did add some more actions to the stop button so it would disable everything instead of just the axes. I raised the (#define TOL) to 30 which helped stop the solenoids fighting each other up or down.

    when I was entering the information in the Stop button I tried to reference it to; #include "MySpindleDefs.h", but the computer c code compiler wouldn't recognize it and told me that the file could not be found.
    I put ClearBit(158) instead of Clearbit(SpeedUp), which is how I wanted it per one of our previous conversations. I put #define SpeedUp 158 in MySpindleDefs and I typed, #include "MySpindleDefs.h", under #include "KMotionDef.h", what did I do Wrong?



  8. #148
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    The Compiler needs to be able to find any include files that you reference. The Compiler looks in the \DSP_KFLOP folder, the \C Programs folder, and the folder where the C File that you are compiling is in. You can also specify relative or full path names. The simplest thing is to put both files in the same directory. Where is the file that you are compiling and where is the MySpindleDefs.h file?

    Regards
    TK http://dynomotion.com


  9. #149
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Where is the file that you are compiling and where is the MySpindleDefs.h file?
    It's in the C:\KMotion435d\C Programs\SpindleUsingJogs\CSS folder. Would it help if I move it out of the SpindleUsingJogs\CSS folder and into the C Programs folder?



  10. #150
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    I'm having a little issue with my Z axis. After reinstalling the new Kanalog board I updated to the new 4.35f software and reinstalled my programs. My Z axis wants to runaway each time I test it in the Step response screen. I am currently only commanding 10000 revs which should only move 1 inch. I know it's been discussed but I can't find where, what am I missing and where is it discussed?



  11. #151
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    My Z axis wants to runaway each time I test it in the Step response screen
    See Why does my Servo "Run Away" as soon as it is enabled?.

    Regards
    TK http://dynomotion.com


  12. #152
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    I was unable to get this to work. I attempted every combination of +1/-1. The axis doesn't runaway until I push the move button when testing, it will stay still if just enabled and runaway in the direction of the +1/-1.

    I checked the wiring to make sure I didn't misplace a wire after rewiring the new board but everything is as it should be.



  13. #153
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Is the encoder working?

    Regards
    TK http://dynomotion.com


  14. #154
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Is the encoder working?
    Yes it is.



  15. #155
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    How do you know?

    Please post a Step Response of the Runaway and your settings.

    Regards
    TK http://dynomotion.com


  16. #156
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    How do you know?
    I can zero out the Z axis in KmotionCNC and it will read when the axis moves.

    Please post a Step Response of the Runaway and your settings.
    I had to decrease the V, A, and J settings so it wouldn't wreck but here is a screen shot of the original.

    Attached Thumbnails Attached Thumbnails starting my C program, any guidance would be appreciated.-screenshot-4-jpg  


  17. #157
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Well that doesn't look like a "runaway" to me. The encoder indicates it only moved 0.18 inches. It was moving normally for the firs 0.04 inches with 10% torque, then for some reason slowed way down, then the servo applied full torque and it sped up again, then for some reason disabled. What actually happened and what did you do?

    Regards
    TK http://dynomotion.com


  18. #158
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    Well that doesn't look like a "runaway" to me. The encoder indicates it only moved 0.18 inches. It was moving normally for the firs 0.04 inches with 10% torque, then for some reason slowed way down, then the servo applied full torque and it sped up again, then for some reason disabled. What actually happened and what did you do?
    It will start and then reverse and if I don't stop it it will travel the length even thoe I command 1 inch and run into the top or bottom. I have a 7 sec video that I can't post.
    I there somewhere I can send it to you.



  19. #159
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3744
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    When you made the plot did the axis move more than 0.18 inches? If so then the encoder isn't working. Possibly a bad connection.

    When you tested the encoder did you verify it was working correctly? Did you move a known amount (ie 4 inches) and verify the encoder changed the correct amount (40000 counts)? Did you move it around and back to the original position and verify the count was the same?

    You might upload it to Youtube. But I'd prefer you just explain what happens.

    Regards
    TK http://dynomotion.com


  20. #160
    Member Gunmachinist's Avatar
    Join Date
    May 2020
    Posts
    225
    Downloads
    0
    Uploads
    0

    Default re: starting my C program, any guidance would be appreciated.

    Quote Originally Posted by TomKerekes View Post
    When you made the plot did the axis move more than 0.18 inches? If so then the encoder isn't working. Possibly a bad connection.
    I will check the connections again.
    When you tested the encoder did you verify it was working correctly? Did you move a known amount (ie 4 inches) and verify the encoder changed the correct amount (40000 counts)? Did you move it around and back to the original position and verify the count was the same?
    No, Since it wasn't working the way it was previously I assumed something worse, and I didn't think of that.

    The above explanation in post 158 is what it is currently doing.



Page 8 of 10 FirstFirst ... 5678910 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

starting my C program, any guidance would be appreciated.

starting my C program, any guidance would be appreciated.

starting my C program, any guidance would be appreciated.