User Tools

Site Tools


profinet

Profinet Library

Overview

The DriveTest Profinet Library is a LabVIEW library which provides functionality to access a Hilscher Profinet device. A preconfigured Hilscher cifx profinet PC card from Hilscher is needed. Multiple instances of the library can be used concurrently with the same Hilscher Profinet device.

The library is in lvlip format (compiled LabVIEW library) and is optimzed for use with National Instruments TestStand.

License

A license is required to use this library. Please contact DriveTest GmbH for more information.

System Requirements

  • Hilscher CIFX 50-RE profinet PC card
  • The profinet card needs to be configured to work as profinet slave
  • The library only works with its respective Labview Version

Functionality

Schematic

Profinet Library schematic

VI's picturing DT Profinet Specification

The following VI's can be used to read and write according to the DT Profinet Specification. The offset and number of bytes are set automatically like you can see in the specification. If you want to read and write at specific positions of the profinet data, please have a look at the next chapter.

read dut.vi

Reads the number of DUT at offset 0 of the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_read dut.vi Connector Pane

Inputs

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

DUT

Data Type Image The data type of this connection is “U8”.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

read event.vi

Reads the number of Event at offset 8 of the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_read event.vi Connector Pane

Inputs

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

Event

Data Type Image The data type of this connection is “U8”.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

read sensors.vi

Reads the the position of a specific sensor of the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_read sensors.vi Connector Pane

Inputs

Sensor

Data Type Image The data type of this connection is “Enum U16”. Wiring this connection is required.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

Position

Data Type Image The data type of this connection is “U8”.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

read serial number roof.vi

Reads the serial number of the roof at offset 16 of the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_read serial number roof.vi Connector Pane

Inputs

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

Serial number roof

Data Type Image The data type of this connection is “String”. Outputs the requested profinet data as a string.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

read single operation control.vi

Reads the number of single operation control at offset 2 of the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_read single operation control.vi Connector Pane

Inputs

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

Single operation control

Data Type Image The data type of this connection is “U8”.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

read test run control.vi

Reads the Test run control at offset 1 of the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_read test run control.vi Connector Pane

Inputs

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write dut.vi

Writes the number of DUT to the profinet data at offset 0. Maximum value of DUT is 255. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write dut.vi Connector Pane

Inputs

DUT

Data Type Image The data type of this connection is “U8”. Wiring this connection is recommended.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write event.vi

Writes the number for waiting for event to offset 8 to the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write event.vi Connector Pane

Inputs

Event

Data Type Image The data type of this connection is “U8”. Wiring this connection is recommended. 0: idle 1: DT waiting for PLC, event #1 2: DT waiting for PLC, event #2 …

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write failed test step.vi

Writes the 64 byte ASCII failed test step starting at offset 128 to the profinet data. The string will be cutted at a length of 64 characters. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write failed test step.vi Connector Pane

Inputs

Failed test step

Data Type Image The data type of this connection is “String”. Wiring this connection is required. Will be cutted at a length of 32 characters.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write pinch force.vi

Writes the Pinch Force of a Sensor to its specific offset 16-21 to the profinet data. Byte 16: Pinch force 1 Byte 17: Pinch force 2 Byte 18: Pinch force 3 Byte 19: Pinch force 4 Byte 20: Pinch force 5 Byte 21: Pinch force 6 Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write pinch force.vi Connector Pane

Inputs

Pinch force

Data Type Image The data type of this connection is “Enum U16”. Wiring this connection is required. Unit: Nm

Force

Data Type Image The data type of this connection is “U8”. Wiring this connection is recommended.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write positions.vi

Writes the SR/Blind Position starting at its specific offset to the profinet data. The position is converted from u16 to 2x u8 Big Endian. Byte 24+25: Position Glass panel Byte 26+27: Position Blind front Byte 28+29: Position Blind rear Byte 30+31: Position reserved Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write positions.vi Connector Pane

Inputs

Part of SR

Data Type Image The data type of this connection is “Enum U16”. Wiring this connection is required. Set the part of the sun roof of wich you want to send the position. 0: Glass panel 1: Blind front 2: Blind rear 3: reserved

Position

Data Type Image The data type of this connection is “U16”. Wiring this connection is recommended.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write sensors.vi

Writes the position request of a Sensor to its specific offset 3-7 to the profinet data. Byte 3: Sensor 1 Byte 4: Sensor 2 Byte 5: Sensor 3 Byte 6: Sensor 4 Byte 7: Sensor 5 Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write sensors.vi Connector Pane

Inputs

Sensor

Data Type Image The data type of this connection is “Enum U16”. Wiring this connection is required.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

position

Data Type Image The data type of this connection is “U8”. Wiring this connection is recommended. 0: Go to home position 1: Go to working position #1 2: Go to working position #2 …

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write serial number edrive pcb.vi

Writes the 32 byte ASCII serial number edrive PCB starting at offset 16 to the profinet data. The string will be cutted at a length of 32 characters. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write serial number edrive pcb.vi Connector Pane

Inputs

PCB number

Data Type Image The data type of this connection is “Enum U16”. Wiring this connection is required.

Serial number edrive PCB

Data Type Image The data type of this connection is “String”. Wiring this connection is recommended. Will be cutted at a length of 32 characters.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write single operation control.vi

Writes the number of Single Operation Control to offset 2 to the profinet data. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write single operation control.vi Connector Pane

Inputs

Single operation control

Data Type Image The data type of this connection is “U8”. Wiring this connection is recommended.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write system error code.vi

Writes the system error code starting at offset 32 to the profinet data. The code is converted from i32 to 4x u8 Big Endian. Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write system error code.vi Connector Pane

Inputs

Error code

Data Type Image The data type of this connection is “I32”. Wiring this connection is recommended.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write test run control.vi

Writes the number of Test Run Control to offset 1 to the profinet data. 0: idle 1: test running 2: test terminated 3: DUT passed 4: DUT failed 5: System error 6: System shut down Please refer to the DT Profinet Specification document for more information.

FIS 29.04.2015

PNlib.lvlib_write test run control.vi Connector Pane

Inputs

Status

Data Type Image The data type of this connection is “Enum U16”. Wiring this connection is recommended.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

Access specific Profinet data

Please use following VI's to read and write data to a specific offset with variable length.

initialize.vi

Starts the Profinet Library Instance. Opens the Cifx-driver, establishes connection to the board and opens a communication channel.

DriveTest GmbH, 27.1.2015 (FIS)

PNlib.lvlib_initialize.vi Connector Pane

Inputs

config file

Data Type Image The data type of this connection is “Path”. Wiring this connection is recommended. Connect this control on the very first call of the VI in your program. Contains the path to the log4net xml configuration file.
Standard: C:\ProgramData\DriveTest\logging\config\Profinet.config.

error in (no error)

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

Profinet Ref

Data Type Image The data type of this connection is “Refnum”. The initializing process creates a reference to the driver and the board which is needed for following profinet related VIs to work properly.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

read.vi

This VI reads the given number of bytes starting at “Byte Index” at the profinet bus. The output data can be used as an array of bytes or ASCII string.

DriveTest GmbH, 27.1.2015 (FIS)

PNlib.lvlib_read.vi Connector Pane

Inputs

Byte Index

Data Type Image The data type of this connection is “I32”. Wiring this connection is required. Defines the point where to start reading data.

Number of Bytes

Data Type Image The data type of this connection is “I32”. Wiring this connection is required. Defines how many bytes are set to read.

Profinet Ref

Data Type Image The data type of this connection is “Refnum”. Wiring this connection is required. Reference to the driver and the board created by the initializing process.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

Data Bytes

Data Type Image The data type of this connection is “Array”. Outputs the requested profinet data as an array of bytes.

Data String

Data Type Image The data type of this connection is “String”. Outputs the requested profinet data as a string.

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

shutdown.vi

Shuts down the Profinet Library Instance. Closes the communication channel and the connection to the cifx driver.

DriveTest GmbH, 27.1.2015 (FIS)

PNlib.lvlib_shutdown.vi Connector Pane

Inputs

Profinet Ref

Data Type Image The data type of this connection is “Refnum”. Wiring this connection is required. Reference to the driver and the board created by the initializing process.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

write.vi

Writes the given data starting at “Start Byte Index” at the profinet bus.

DriveTest GmbH, 27.1.2015 (FIS)

PNlib.lvlib_write.vi Connector Pane

Inputs

Data

Data Type Image The data type of this connection is “Array”. Wiring this connection is required. Array of bytes to be written at the profinet data.

Profinet Ref

Data Type Image The data type of this connection is “Refnum”. Wiring this connection is required. Reference to the driver and the board created by the initializing process.

Start Byte Index

Data Type Image The data type of this connection is “U32”. Wiring this connection is required. Defines the point where to start writing data.

error in

Data Type Image The data type of this connection is “Cluster”. Wiring this connection is recommended. Use this input for data flow or to inhibit excecution in case of errors in previous VIs.

Outputs

error out

Data Type Image The data type of this connection is “Cluster”. Information about run-time errors in this VI. Incoming errors are looped through to this output.

profinet.txt · Last modified: 2015/04/30 10:24 by dennis