Herunterladen Inhalt Inhalt Diese Seite drucken

Pepperl+Fuchs VAM-CTR-PC2 Handbuch Seite 39

Inhaltsverzeichnis

Werbung

/* switch to configuration mode */
Page(D_DATA);
Index(D_DATA);
Write(0x01);
error = send_cmd(C_SET_MODE); /* command to set mode */
if(error)
{
printf("can't switch to configuration mode.");
return;
}
/* write new list of projected slaves (LPS) */
Page(D_LPS);
Index(D_LPS);
for(i=0 ; i<sizeof(lps) ; i++)
Write( lps[i] );
error = send_cmd(C_SET_LPS);
if(error)
{
printf("can't update LPS.");
return;
}
/* write new permanent configuration data (PCD) */
Page(D_PCD);
Index(D_PCD);
for(i=0 ; i<sizeof(pcd) ; i++)
Write( pcd[i] );
error = send_cmd(C_SET_PCD);
if(error)
{
printf("can't update PCD.");
return;
}
/* write new PP */
Page(D_PP);
Index(D_PP);
for(i=0 ; i<sizeof(pp) ; i++)
Write( pp[i] );
error = send_cmd(C_SET_PP);
if(error)
{
printf("can't update PP.");
return;
}
/* return to protected operation mode */
Page(D_DATA);
Index(D_DATA);
Write(0x00);
error = send_cmd(C_SET_MODE); /* command to set mode */
if(error)
{
printf("can't return to protected operation mode.");
return;
}
/* wait for normal operation */
Page(D_EC_FLAGS);
time (&timer);
Zumutbare Änderungen aufgrund technischer Verbesserungen vorbehalten.
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
/* write something bigger than 1 */
/* to the parameter "data" */
/* write LPS to DPRAM */
/* command to update LPS */
/* write PCD to DPRAM */
/* command to update PCD */
/* write PP to DPRAM */
/* command to update PP */
/* write 0 to the parameter "data" */
/* store actual time */
AS-i PC2 Karte
Anhang
Copyright Pepperl+Fuchs, Printed in Germany
39

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis