Herunterladen Inhalt Inhalt Diese Seite drucken

Pepperl+Fuchs VAM-CTR-PC2 Handbuch Seite 38

Inhaltsverzeichnis

Werbung

#define INDEX 1
#define PAGE 2
/* addresses in the DPRAM */
#define D_COMMAND 0x1F0
#define D_DATA 0x1F1
#define D_LPS 0x12C
#define D_PCD 0x150
#define D_PP 0x180
#define D_PI 0x170
#define D_EC_FLAGS 0x112
#define D_WDOG_ENA 0x100
#define D_WDOG_CNT 0x101
#define D_IDI 0x102
#define D_ODI 0x113
/* command codes (used for the DPRAM's command byte) */
#define C_SET_MODE 17
#define C_SET_PP 3
#define C_SET_PCD 8
#define C_SET_LPS 12
/* macros for addressing, reading and writing of the DPRAM */
/* the functions "inp" and "outp" have to be adapted to your */
/* operating system */
#define Page(Loc)
#define Index(Loc)
#define Read(Var)
#define Write(Var)
/* ================================================================ */
/* F U N C T I O N
static int send_cmd(unsigned char command);
/* ================================================================ */
/* FUNCTION:
/* ================================================================ */
void main (void)
{
int error, i;
int which_bar_to_print = 1;
time_t timer;
/* AS-i execution control flags */
unsigned char flags;
/* AS-i input data */
unsigned char idata[16];
/* AS-i output data */
unsigned char odata[16] = {0xFF,0xFF,0xFF,0xFF,
/* disable watchdog */
Page(D_WDOG_ENA);
Index(D_WDOG_ENA);
Write(0x00);
Zumutbare Änderungen aufgrund technischer Verbesserungen vorbehalten.
38
Pepperl+Fuchs GmbH · 68301 Mannheim · Telefon (06 21) 7 76-11 11 · Telefax (06 21) 7 76-10 00 · Internet http://www.pepperl-fuchs.com
outp(BASE_ADDRESS+PAGE, (Loc) >> 8)
outp(BASE_ADDRESS+INDEX, (Loc) & 0xFF)
Var = (unsigned char)inp(BASE_ADDRESS+DATA)
outp(BASE_ADDRESS+DATA, (Var))
P R O T O T Y P E S
main
0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF};
AS-Interface
Anhang
*/
*/
Copyright Pepperl+Fuchs, Printed in Germany

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis