Micro step setting of closed-loop system #define


gs3c@...
 

I want to use MKS servo 42b closed-loop motor with 160:1 harmonic reducer.I can set the micro step on the closed-loop controller.  it is a fixed value,cannot be set in real time through the main board.
How do I set it in firmware. It seems that the same value cannot be set in "minipcb. H".
 
#Define stepsperdegreeasys1 11377.7778
/ / calculated as: stepper ﹐ steps * micro ﹐ steps * gear ﹐ reduction1 * (gear ﹐ reduction2 / 360) micro pulses per degree
// : 200 * 128 * 1 * 160/360 = 11377.78
#define AXIS1_MICROSTEPS 128
#define AXIS1_MICROSTEPS_GOTO 128





Here is the error
In file included from sketch\Config.MiniPCB.h:227:0,
 
                 from sketch\Config.h:13,
 
                 from H:\天文工程\赤道仪\便携赤道仪\OnStep\OnStep.ino:53:
 
Pins.MiniPCB.h:83:2: error: #error "Wrong processor for this configuration!"
 
 #error "Wrong processor for this configuration!"
 
  ^~~~~
 
In file included from H:\天文工程\赤道仪\便携赤道仪\OnStep\OnStep.ino:54:0:
 
sketch\src/HAL/HAL.h:67:4: error: #error "Unsupported Platform! If this is a new platform, it needs the appropriate entries in the HAL directory."
 
   #error "Unsupported Platform! If this is a new platform, it needs the appropriate entries in the HAL directory."
 
    ^~~~~
 
In file included from H:\天文工程\赤道仪\便携赤道仪\OnStep\OnStep.ino:55:0:
 
Validate.h:465:10: error: #error "Configuration: AXIS1_MICROSTEPS_GOTO should be less than AXIS1_MICROSTEPS or _OFF"
 
         #error "Configuration: AXIS1_MICROSTEPS_GOTO should be less than AXIS1_MICROSTEPS or _OFF"
 
          ^~~~~
 
Validate.h:510:10: error: #error "Configuration: AXIS2_MICROSTEPS_GOTO should be less than AXIS2_MICROSTEPS or _OFF"
 
         #error "Configuration: AXIS2_MICROSTEPS_GOTO should be less than AXIS2_MICROSTEPS or _OFF"
 
          ^~~~~
 


Howard Dutton
 

What OnStep version?

Post configuration file or files.


gs3c@...
 

What OnStep version?

#define FirmwareDate          __DATE__
#define FirmwareVersionMajor  2
#define FirmwareVersionMinor  22      // minor version 0 to 99
#define FirmwareVersionPatch  "l"     // for example major.minor patch: 1.3c
#define FirmwareVersionConfig 2       // internal, for tracking configuration file changes
#define FirmwareName          "On-Step"
#define FirmwareTime          __TIME__

Post configuration file or files.
I think the error is because the firmware set the number of “MICROSTEPS_GOTO” must be less than the “track microsteps”. This is true of any onfiguration file.
I want to know where to change? Can make these two values ​​the same and compile successfully.


Khalid Baheyeldin
 

On Thu, Mar 19, 2020 at 09:32 PM, <gs3c@...> wrote:
I think the error is because the firmware set the number of “MICROSTEPS_GOTO” must be less than the “track microsteps”. This is true of any onfiguration file.
I want to know where to change? Can make these two values ​​the same and compile successfully.

You have another error:

Pins.MiniPCB.h:83:2: error: #error "Wrong processor for this configuration!"

You didn't select the correct board for the platform that you intend to use.
If you have the MiniPCB, then you must select Teensy 3.2.

Also this is wrong:

#Define stepsperdegreeasys1 11377.7778

But, why are you using 2.22? If this is your first time using OnStep, you should use 3.16 only.


gs3c@...
 
Edited

In version 3.16, I found this statement.

 Validate.h
#if AXIS1_DRIVER_MODEL != OFF
 
  // validate tracking and goto micro-step modes
  #if AXIS1_DRIVER_MICROSTEPS == OFF
    #error "Configuration (Config.h): AXIS1_DRIVER_MICROSTEPS must be set if using AXIS1_DRIVER_MODEL!"
  #endif
  #if AXIS2_DRIVER_MICROSTEPS == OFF
    #error "Configuration (Config.h): AXIS2_DRIVER_MICROSTEPS must be set if using AXIS2_DRIVER_MODEL!"
  #endif
  #if AXIS1_DRIVER_MICROSTEPS_GOTO != OFF
    #if AXIS1_DRIVER_MODEL != SERVO && AXIS1_DRIVER_MODEL != SERVO1 && AXIS1_DRIVER_MODEL != SERVO2
      #if (AXIS1_DRIVER_MICROSTEPS <= AXIS1_DRIVER_MICROSTEPS_GOTO) && (!(MODE_SWITCH_BEFORE_SLEW != OFF && AXIS1_DRIVER_MICROSTEPS == AXIS1_DRIVER_MICROSTEPS_GOTO))
          #error "Configuration (Config.h): AXIS1_DRIVER_MICROSTEPS_GOTO should be less than AXIS1_DRIVER_MICROSTEPS or OFF"
      #endif
      #define AXIS1_DRIVER_STEP_GOTO (AXIS1_DRIVER_MICROSTEPS/AXIS1_DRIVER_MICROSTEPS_GOTO)
    #else
      #define AXIS1_DRIVER_STEP_GOTO (AXIS1_DRIVER_MICROSTEPS_GOTO/AXIS1_DRIVER_MICROSTEPS)
    #endif


Howard Dutton
 

On Thu, Mar 19, 2020 at 09:49 PM, <gs3c@...> wrote:
#error "Configuration (Config.h): AXIS1_DRIVER_MICROSTEPS_GOTO should be less than AXIS1_DRIVER_MICROSTEPS or OFF
Turn these OFF as instructed in the error message.

There's documentation, click on the links in the section titles of the Config.h file this is explained there.


gs3c@...
 

https://onstep.groups.io/g/main/wiki/6-Configuration#AXIS2
AXIS2_DRIVER_MICROSTEPS
  • Default Value: OFF
  • Other Values1 to 256
  • Notes: Tracking mode micro-steps setting, also used for gotos & slews if AXIS2_DRIVER_MICROSTEPS_GOTO is OFF.  A setting of 1 means a full-step, 2 half-step, 4 quarter-step, and so on.  We often use a value of 16, 32, or 64 here.
  • Reminder:
    • This value is present in the Configuration Calculator, if you change this AXIS2_STEPS_PER_DEGREE changes also.
    • Exact values allowed depends on the stepper driver model.   OnStep will #error on compilation if the driver doesn't support the micro-step mode specified.

I think that's the problem. Using an external drive may cause compilation to fail. Because these two values cannot be set the same.  DRIVER_MICROSTEPS = DRIVER_MICROSTEPS_GOTO = ERROR!