MTS Sensors Temposonics Powerlink V2 R Series Operation Manual page 35

Magnetostrictive linear position sensors
Table of Contents

Advertisement

6.2.3 Used variables
The following local variables are used to change the node ID (Fig. 61).
Fig. 61: Screenshot of used variables
Name
Description
fbSdoRead
Predefined function block (AsEPL library) to execute
read operations on Powerlink nodes.
fbSdoWrite
Predefined function block (AsEPL library) to execute
write operations on Powerlink nodes.
u8NodeFoundAt
Unsigned 8 bit integer to store the node ID of the
first controlled node with MTS vendor ID which has
been found.
u8NodeIdToSet
Constant unsigned 8 bit integer which contains the
node ID that shall be set.
u8NmtResetNodeCmd
Constant unsigned 8 bit integer for the command
which has to be sent to the reset SDO in order to
reset the sensor.
u32VendorID
Unsigned 32 bit integer to store the vendor ID of
the node which is currently checked in state
STATE_SEARCH_FOR_NODE.
iState
Integer variable which represents the current state of
the implemented state machine.
Fig. 62: Variables used
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 MTS controlled node to a value
which is invalid for a controlled node (source code below).
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)
{
iState = STATE_SEARCH_FOR_NODE;
u8NodeId = 0;
u8NodeFoundAt = 255;
}
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 (source code on page 36).
I 35 I
Temposonics
R-Series Powerlink V2
®
Operation Manual
//initialize current state
//initialize node id currently using for search
//set node id found to invalid node id

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Temposonics Powerlink V2 R Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents