Driver L6470 Pentru Motoare Pas Cu Pas Electrice1 PDF
Driver L6470 Pentru Motoare Pas Cu Pas Electrice1 PDF
Driver L6470 Pentru Motoare Pas Cu Pas Electrice1 PDF
#include <AutoDriver.h>
#include <dSPINConstants.h>
byte stepMode=STEP_FS;
float stepsPerSecond=500;
byte dir=FWD;
float stepsPerSec=500;
void setup()
void busyCheck();
void softStop();
void hardStop();
void softHiZ();
void hardHiZ();
long getPos();
void resetPos();
void goHome();
dSPINConfig();
Serial.begin(9600);
boardA.resetDev();
void loop()
if (Serial.available() !=0)
{
Serial.read();
boardA.configStepMode(STEP_FS);
boardA.setMaxSpeed(stepsPerSecond);
boardA.setFullSpeed(stepsPerSecond);
boardA.run(dir, stepsPerSec);
delay(1000);
void dSPINConfig(void)
boardA.configSyncPin(BUSY_PIN, 0);
boardA.configStepMode(STEP_FS);
boardA.setMaxSpeed(10000);
boardA.setFullSpeed(10000);
boardA.setAcc(10000);
boardA.setDec(10000);
boardA.setSlewRate(SR_530V_us);
boardA.setOCThreshold(OC_750mA);
boardA.setPWMFreq(PWM_DIV_2, PWM_MUL_2);
boardA.setOCShutdown(OC_SD_DISABLE);
boardA.setVoltageComp(VS_COMP_DISABLE);
boardA.setSwitchMode(SW_USER);
boardA.setOscMode(INT_16MHZ_OSCOUT_16MHZ);
boardA.setAccKVAL(255);
boardA.setDecKVAL(255);
boardA.setRunKVAL(255);
boardA.setHoldKVAL(32);
}
Programul 2
#include <AutoDriver.h>
#include <dSPINConstants.h>
byte stepMode=STEP_FS;
float stepsPerSecond=200;
byte dir=FWD;
float stepsPerSec=500;
void setup()
void busyCheck();
void softStop();
void hardStop();
void softHiZ();
void hardHiZ();
long getPos();
void resetPos();
void goHome();
dSPINConfig();
Serial.begin(9600);
boardA.resetDev();
void loop()
if (Serial.available() !=0)
{
Serial.println("Citeste comanda");
Serial.read();
Serial.println("Incepe miscarea");
boardA.busyCheck();
boardA.configStepMode(STEP_FS);
boardA.setMaxSpeed(stepsPerSecond);
boardA.setFullSpeed(stepsPerSecond);
boardA.move(dir, 300);
delay(1000);
boardA.softStop();
delay(1000);
void dSPINConfig(void)
boardA.configSyncPin(BUSY_PIN, 0);
boardA.configStepMode(STEP_FS);
boardA.setMaxSpeed(10000);
boardA.setFullSpeed(10000);
boardA.setAcc(10000);
boardA.setDec(10000);
boardA.setSlewRate(SR_530V_us);
boardA.setOCThreshold(OC_750mA);
boardA.setPWMFreq(PWM_DIV_2, PWM_MUL_2);
boardA.setOCShutdown(OC_SD_DISABLE);
boardA.setVoltageComp(VS_COMP_DISABLE);
boardA.setSwitchMode(SW_USER);
boardA.setOscMode(INT_16MHZ_OSCOUT_16MHZ);
boardA.setAccKVAL(255);
boardA.setDecKVAL(255);
boardA.setRunKVAL(255);
boardA.setHoldKVAL(32);
Programul 3
#include <AutoDriver.h>
#include <dSPINConstants.h>
byte stepMode=STEP_FS;
float stepsPerSecond=500;
byte dir=FWD;
float stepsPerSec=500;
void setup()
void resetDev();
void busyCheck();
void softStop();
void hardStop();
void softHiZ();
void hardHiZ();
long getPos();
void resetPos();
void goHome();
dSPINConfig();
Serial.begin(9600);
Serial.println("Dati comanda de pornire");
boardA.resetDev();
void loop()
if (Serial.available() !=0)
Serial.println("Citeste comanda");
Serial.read();
Serial.println("Incepe miscarea");
boardA.busyCheck();
boardA.configStepMode(STEP_FS);
boardA.setMaxSpeed(stepsPerSecond);
boardA.setFullSpeed(stepsPerSecond);
boardA.move(dir, 300);
delay(1000);
boardA.softHiZ();
delay(1000);
void dSPINConfig(void)
boardA.configSyncPin(BUSY_PIN, 0);
boardA.configStepMode(STEP_FS);
boardA.setMaxSpeed(10000);
boardA.setFullSpeed(10000);
boardA.setAcc(10000);
boardA.setDec(10000);
boardA.setSlewRate(SR_530V_us);
boardA.setOCThreshold(OC_750mA);
boardA.setPWMFreq(PWM_DIV_2, PWM_MUL_2);
boardA.setOCShutdown(OC_SD_DISABLE);
boardA.setVoltageComp(VS_COMP_DISABLE);
boardA.setSwitchMode(SW_USER);
boardA.setOscMode(INT_16MHZ_OSCOUT_16MHZ);
boardA.setAccKVAL(255);
boardA.setDecKVAL(255);
boardA.setRunKVAL(255);
boardA.setHoldKVAL(32);