DAS  3.1.6 - 18/09/2017
DXL.H
Go to the documentation of this file.
1 
16 typedef struct DXL_par {
17  int com;
18  int speed;
19  int add;
20  char bufrx[1024];
21  char buftx[1024];
22 }DXL_par;
23 
24 // DXL Procedures
25  int DXL_Open(int addr, int com, int baud);
49  int DXL_Close(void);
53 
54  void DXL_TxStr(char *tx, int len);
60 
61  int DXL_RxStr(char *rx, int *len);
68 
69 /*****************************************/
70 /* Procedures implemented by DANBO */
71 /****************************************/
72  void AMS_assadd(int w);
78 
79 /****************************************/
80  void AMS_Default(int id);
86 
87 /****************************************/
88  int AMS_Power(int id, int powa, int powb);
105 
106 /****************************************/
107  int AMS_Step(int id, int stepa, int stepb);
121 
122 /****************************************/
123  int AMS_Slope(int id, int slopea, int slopeb);
137 
138 /****************************************/
139  int AMS_Speed(int id, int speeda, int speedb);
153 
154 /****************************************/
155  int AMS_TrackOn(int id, int adir, int bdir, unsigned long acount, unsigned long bcount);
171 
172 /****************************************/
173  int AMS_TrackOff(int id, int amot, int bmot);
187 
188 /****************************************/
189  int AMS_chkbitsts(int id, int bitn);
197 
198 /****************************************/
199  int AMS_firmrev(int id);
205 
206 /****************************************/
207  int AMS_dirfin(int id, int dira, int dirb);
215 
216 /****************************************/
217  int AMS_DoPos(int id, int dira, int dirb, unsigned long stepa, unsigned long stepb);
233 
234 /****************************************/
235  int AMS_sendstep(int id, int dira, int dirb, unsigned long stepa, unsigned long stepb);
251 
252 /****************************************/
253  unsigned long AMS_ReadStep(int id, int motor);
261 
262 /****************************************/
263  int AMS_TestPos(int id, int motor);
271 
272 /****************************************/
273  int AMS_AzzeraCoord(int id, int mtr);
281 
282 /****************************************/
283  int AMS_wopto(int id, unsigned int w);
291 
292 /****************************************/
293  void AMS_PWM(int id, int on, int off);
302 
303 /****************************************/
304 
305  int AMS_Home(int id, int mota, int motb);
316 
317 /****************************************/
318  int AMS_HomeDefault(int id, int mota, int motb);
329 
330 void AMS_PWM_OFF(int id);
331 
332 void AMS_PWM_Zero(int mod);
333 
334 
335 
336 /****************************************/
337  int AMS_MotorOn_Off(int id, int mtr1, int mtr2);
355 
356 int AMS_Divisore(int id, unsigned long par1, unsigned long par2);
357  int AMS_TestHome(int id, int par1);
366 
367  int AMS_TestWork(int id, int par1);
376 
377 
378 
379 
380 
char buftx[1024]
Tx buffer.
Definition: DXL.H:21
unsigned long AMS_ReadStep(int id, int motor)
read performed steps Procedure for the determination of the number of steps executed.
Definition: Dxl.c:60
int AMS_sendstep(int id, int dira, int dirb, unsigned long stepa, unsigned long stepb)
Send steps Procedure for sending steps to the Stepper Motor.
Definition: Dxl.c:513
int DXL_Close(void)
Close COM.
Definition: Dxl.c:1258
int AMS_dirfin(int id, int dira, int dirb)
Set Final Directions .
Definition: Dxl.c:457
void AMS_assadd(int w)
Assign AMS address Procedure for assigment of the AMS address.
Definition: Dxl.c:25
DXL structure. Structure for the serial communication with the AMS adapter.
Definition: DXL.H:16
void AMS_Default(int id)
Set default values to AMS parameters Procedure for setting the default values of power.speed, stepping and slope to the selected AMS adapter.
Definition: Dxl.c:174
int AMS_TrackOff(int id, int amot, int bmot)
tracking off Procedure for Stepper Motor tracking de-activation
Definition: Dxl.c:422
int AMS_Step(int id, int stepa, int stepb)
Set stepping for the Stepper motors Procedure for setting steps for the Stepper Motors.
Definition: Dxl.c:349
int AMS_Divisore(int id, unsigned long par1, unsigned long par2)
Definition: Dxl.c:946
int speed
Baud rate.
Definition: DXL.H:18
int AMS_AzzeraCoord(int id, int mtr)
Set to zero the number of steps on the selected motor Set to zero the number of steps on the selecte...
Definition: Dxl.c:439
int AMS_DoPos(int id, int dira, int dirb, unsigned long stepa, unsigned long stepb)
Execute Positioning Execute Stepper positioning. Make all the control on the status of the selected m...
Definition: Dxl.c:644
int AMS_Power(int id, int powa, int powb)
Set Power for AMS Procedure for setting the user choosed power to the selected AMS adapter...
Definition: Dxl.c:326
int AMS_Home(int id, int mota, int motb)
Home position for the selected motor the home position is reached with the standard parameters (1KHz...
Definition: Dxl.c:549
char bufrx[1024]
Rx buffer.
Definition: DXL.H:20
int DXL_Open(int addr, int com, int baud)
Open COM.
Definition: Dxl.c:1243
int add
Peripheral address.
Definition: DXL.H:19
int AMS_Speed(int id, int speeda, int speedb)
Set speed to the Stepper motors Procedure for setting speed for the Stepper Motors.
Definition: Dxl.c:386
void AMS_PWM_OFF(int id)
Definition: Dxl.c:584
int AMS_wopto(int id, unsigned int w)
write the value on the optoinsulated port write the value on the optoinsulated port.
Definition: Dxl.c:911
int AMS_TestWork(int id, int par1)
verify the if work position has been reached
Definition: Dxl.c:1064
int AMS_firmrev(int id)
Firmware Revision Number .
Definition: Dxl.c:475
struct DXL_par DXL_par
DXL structure. Structure for the serial communication with the AMS adapter.
int AMS_TestPos(int id, int motor)
Test positioning status Procedure for testing the positioning status of the selected motor...
Definition: Dxl.c:31
void DXL_TxStr(char *tx, int len)
send string to a serial port
Definition: Dxl.c:1153
int DXL_RxStr(char *rx, int *len)
receive string from a serial port
Definition: Dxl.c:1187
int AMS_chkbitsts(int id, int bitn)
check bit status Procedure for the determination of the bit number status.
Definition: Dxl.c:192
int AMS_TrackOn(int id, int adir, int bdir, unsigned long acount, unsigned long bcount)
Activate tracking Procedure for Stepper Motor tracking activation.
Definition: Dxl.c:404
int AMS_HomeDefault(int id, int mota, int motb)
Definition: Dxl.c:567
void AMS_PWM(int id, int on, int off)
set the on/off time on the PWM set the on/off time on the PWM.
Definition: Dxl.c:492
int AMS_Slope(int id, int slopea, int slopeb)
Set slope to the Stepper motors Procedure for setting the slope fot the Stepper Motors.
Definition: Dxl.c:368
int AMS_MotorOn_Off(int id, int mtr1, int mtr2)
Motor ON-OFF. Switch On-Off the selected motor of the selected AMS.
Definition: Dxl.c:930
int com
Comunication port.
Definition: DXL.H:17
void AMS_PWM_Zero(int mod)
Definition: Spat_Device.c:2570
int on
PRG execution control variabile.
Definition: DAS_Spat.c:109
int AMS_TestHome(int id, int par1)
verify if the home position has been reached
Definition: Dxl.c:1042
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:08 for DAS - Rel. 3.1.6 - 18/09/2017.