
Temposonics
®
R-Series
V
POWERLINK
Operation Manual
I 45 I
6.2.4 Program executed by PLC once after start-up (SdoAccessInit.c)
This program initializes the state of the implemented state machine
as well as the node ID variable. It also sets the variable which is used
to store the node ID of the first found controlled node with vendor ID
from Temposonics to a value which is invalid for a controlled node
(source code below).
6.2.5 Program executed by PLC cyclically (SdoAccessCyclic.c)
This program implements the state machine and changes the node ID
of R-Series POWERLINK as well as R-Series
V
POWERLINK (source
Source Code “SdoAccessInit.c”
/********************************************************************
* COPYRIGHT --
********************************************************************
* Program: SdoAccess
* File: SdoAccessInit.c
* Author: SSchumacher
* Created: November 18, 2014
********************************************************************
* Implementation of program SdoAccess
********************************************************************/
#include <bur/plctypes.h>
#ifdef _DEFAULT_INCLUDES
#include <AsDefault.h>
#endif
void
_INIT SdoAccessInit(
void
)
{
//initialize current state
iState = STATE_SEARCH_FOR_NODE;
//initialize node id currently using for search
u8NodeId = 0;
//set node id found to invalid node id
u8NodeFoundAt = 255;
}