2 / 2 6 / 2 0 0 2 2 : 0 6 P M 2 / 2 6 / 2 0 0 2
1 3 5
N M I L - 7 0 5 6 S E R V O M O T O R D R I V E R
C S A M P L E P R O G R A M
#include c:\NMIY0031\clib\common51.c
#include c:\NMIY0031\clib\syslib51.c
#include c:\NMIY0031\clib\stdio.h
#include c:\NMIY0031\clib\atoi.c
#include c:\NMIY0031\clib\fgetc.c
#include c:\NMIY0031\clib\fprintf.c
#include c:\NMIY0031\clib\fputc.c
#include c:\NMIY0031\clib\fscanf.c
#include c:\NMIY0031\clib\is.c
#include c:\NMIY0031\clib\itoa.c
#include c:\NMIY0031\clib\itoab.c
#include c:\NMIY0031\clib\peekpoke.c
#include c:\NMIY0031\clib\reverse.c
#include c:\NMIY0031\clib\strlen.c
#include c:\NMIY0031\clib\ungetc.c
#include c:\NMIY0031\clib\utoi.c
#define CMDPORT
0xFFE0
#define DATAPORT
0xFFE1
#define LFIL
0x1E
#define LTRJ
0x1F
#define MSKI
0x1C
#define RESET
0x00
#define RSTI
0x1D
#define STT
0x01
#define UDF
0x04
int
commnd,
/* command byte to be sent to NMIL-7056 */
status,
/* status byte returned from NMIL-7056 */
/* trajectory varaibles */
accel4, accel3, accel2, accel1, /* acceleration variables */
posit4, posit3, posit2, posit1, /* position variables */
veloc4, veloc3, veloc2, veloc1, /* velocity variables */
/* filter double word variables */
kd2, kd1, ki2, ki1, kp2, kp1, il2, il1,
/* temp variables used to hold word values */
/* to be sent as data to the NMIL-7056 */
dbyte2,
dbyte1,
/* filter control word */
filter2,
filter1,
/* trajectory control word */
trajec2,
trajec1;
/**************************************************************************************/
/* This C program demonstrates the NMIY-0031 as a host processor
*/
/* for the NMIL-7056 servo motor driver.
*/
/*
*/
/* The NMIL-7056 uses two memory mapped registers. There is a
*/
/* command port and a data port. The examples are written for a
*/
/* command port at 0xFFE0 and a data port at 0xFFE1.
*/
/*
*/
/* Each command is a single byte written to the command port,
*/
/* followed by an even number of bytes. Some commands require no */
/* data, some require a fixed number of bytes, and others require
*/
/* a variable number of bytes. Commands with a variable number of */
/* data bytes use a control word as the first two data bytes.
*/
/* The data byte pairs represent either a word or a double word
*/
/* value. Data transfers are written most significant byte first. */
/*
*/
/* Filter parameters must be adjusted to fit each system. System
*/
Содержание NMIY-0031
Страница 1: ...2 2 6 2 0 0 2 2 0 6 P M 1 NMIY 0031 Single Board Computer Covers NMIY 0031 V1 0 4 22 96 ...
Страница 2: ...2 2 6 2 0 0 2 2 0 6 P M 2 ...
Страница 6: ...2 2 6 2 0 0 2 2 0 6 P M 6 ...
Страница 8: ...2 2 6 2 0 0 2 2 0 6 P M 8 ...
Страница 14: ...2 2 6 2 0 0 2 2 0 6 P M 1 4 ...
Страница 30: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 0 ...
Страница 32: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 2 ...
Страница 50: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 0 ...
Страница 52: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 2 ...
Страница 54: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 4 ...
Страница 56: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 6 ...
Страница 58: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 8 ...
Страница 60: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 0 ...
Страница 62: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 2 ...
Страница 68: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 8 ...
Страница 70: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 0 ...
Страница 72: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 2 ...
Страница 76: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 6 ...
Страница 82: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 2 ...
Страница 84: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 4 ...
Страница 86: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 6 ...
Страница 88: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 8 ...
Страница 90: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 9 0 ...
Страница 102: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 2 ...
Страница 108: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 8 ...
Страница 110: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 0 ...
Страница 114: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 4 ...
Страница 118: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 8 ...
Страница 126: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 6 ...
Страница 128: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 8 ...
Страница 134: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 3 4 ...
Страница 148: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 4 8 ...
Страница 150: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 0 ...
Страница 152: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 2 ...
Страница 154: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 4 ...
Страница 156: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 6 ...
Страница 168: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 6 8 ...
Страница 170: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 0 ...
Страница 172: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 2 ...
Страница 174: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 4 ...
Страница 178: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 8 ...