Programming Example, Fp-Fns Block Canopen - Panasonic FPSIGMA Technical Manual

Fieldbus slave units
Table of Contents

Advertisement

Programming Examples for FPWIN Pro

5.7 Programming Example, FP-FNS Block CANopen

After you install the FNS Library, you can start programming.
1. Create the Data Unit Types (DUTs) for inputs and outputs.
2. Create input and output variables of the type of DUT generated in the previous
step in the global variable list.
3. Generate the configuration data table for inputs and outputs by using the function
FNS_InitConfigDataTable (see page 49). Make sure that the size of the
FNS_InitConfigDataTable output variable corresponds to the DUT.
4. Create pointers of the input, output and ConfigDataTable variables and provide
them to the FNS_CANopen function block together with the corresponding
variables.
Data Unit Types (DUTs)
In the following picture you can see all possible data types and how the different variables
(16-bit, 32-bit and 64-bit) can be defined.
64-bit variables are declared by creating a two-dimensional array, whereas the second
dimension must have a size of four. The first dimension specifies the number of elements of
this type.
In the CANopen network, each entry of the DUT is represented as one PDO (Process Data
Object). Each PDO can carry up to 4 words (64 bits) of data. The FNS_CANopen function
block supports up to 32 TPDOs and 32 RPDOs. The exact representation of the process data
depends on the structure of the .eds file. Only the data types that are supported in each .eds
file can be used.
The .eds files from Panasonic Electric Works Europe AG only support one data type for all 32
RPDOs and 32 TPDOs, so please choose the .eds file that best suits your needs. The
following .eds files are available at the moment:
FNS_32PDO_UNSIGNED.EDS, supports the data type unsigned16 (WORD) only
60

Advertisement

Table of Contents
loading

Table of Contents