Giter Site home page Giter Site logo

mbuesch / pyprofibus Goto Github PK

View Code? Open in Web Editor NEW
121.0 24.0 46.0 722 KB

PROFIBUS-DP stack

Home Page: https://bues.ch/a/profibus

License: GNU General Public License v2.0

Python 71.57% Shell 3.79% Makefile 0.76% Verilog 23.88%
plc profibus profibus-dp sps

pyprofibus's Introduction

pyprofibus - PROFIBUS-DP stack

pyprofibus is an Open Source PROFIBUS-DP stack written in Python.

pyprofibus home

Git repository

Github repository

Hardware

pyprofibus is able to run on any machine that supports Python. It also runs on embedded machines such as the Raspberry Pi or even tiny microcontrollers such as the ESP32 (Micropython).

Please read the hardware documentation for more information:

pyprofibus hardware documentation

Speed / Baud rate

The achievable Profibus-DP speed depends on the hardware that it runs on and what kind of serial transceiver is used. There is no software side artificial limit.

Please see the pyprofibus hardware documentation

Examples

pyprofibus comes with a couple of examples that can teach you how to use pyprofibus in your project.

  • Example that runs pyprofibus without any hardware. This example can be used to play around with pyprofibus.
    • examples/example_dummy_oneslave.py
    • examples/example_dummy_oneslave.conf
    • examples/example_dummy_twoslaves.py
    • examples/example_dummy_twoslaves.conf
    • examples/example_dummy_inputonly.py
    • examples/example_dummy_inputonly.conf
  • Example that runs pyprofibus as master connected to an ET200S as slave.
    • examples/example_et200s.py
    • examples/example_et200s.conf
  • Example that runs pyprofibus as master connected to an S7-315-2DP as slave.
    • examples/example_s7-315-2dp.py
    • examples/example_s7-315-2dp.conf

Dependencies

License

Copyright (c) 2013-2024 Michael Büsch <[email protected]>

Licensed under the terms of the GNU General Public License version 2, or (at your option) any later version.

pyprofibus's People

Contributors

ctbenergy avatar mbuesch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyprofibus's Issues

Terminating: GSD 'HIL_0B69.gsd': DPv1 User_Prm_Data is shorter than 3 bytes

I have a GSD file from Hilscher that has "DPV1_Slave = 1" indicates it support DPV1. Going through pyProfibus it generated the above error in getUserPrmData() in interp.py . Judging from the code, it seems there are relationship between DPV1 and "User_Prm_Data", "User_Prm_Data_Len", "Ext_User_Prm_Data_Const", and "Ext_Module_Prm_Data_Len". These parameters are not in the GSD file. I cannot find these requirements in the Profibus Specification.

It works fine after I changed "DPV1_Slave = 0".

Warning in GSD: User_Prm_Data truncated by User_Prm_Data_Len

I, probably, found a strange bug.
When i use pyprofibus via python console, everything is ok, but when i', trying to use pyprofibus-linuxcnc-hal with the same devices and config file, i get this warnings on both devices in profibus net. Also, it sends a garbage instead of parameters, devices report a faulty parametrization, and this again.

I've tried to add theese lines in "setup profibus stack" section:
print(str(slaveConf.gsd.getUserPrmData(dp1PrmMask=dp1PrmMask, dp1PrmSet=dp1PrmSet))).
to see, what it parses. The output is cutted: something like [0, 32, 0, 22, 95, 4, 138. (here is a prefix of correct User_Prm ). Probably it is cutted because of linuxcnc realtime tasks. But when i'm trying to run sudo python3 pyprofibus-linuxcnc-hal -W 0 without linuxcnc, it fails with "can not find hal_ module"

How to run pyprofibus-linuxcnc-hal without linuxcnc for debug tasks? Have you any ideas why the parser works correctly, but it sends strange parameters to devices?

                master = config.makeDPM()
		for slaveConf in config.slaveConfs:
			slaveDesc = slaveConf.makeDpSlaveDesc()
			dp1PrmMask = bytearray((
				DpTelegram_SetPrm_Req.DPV1PRM0_FAILSAFE,
				DpTelegram_SetPrm_Req.DPV1PRM1_REDCFG,
				0x00))
			dp1PrmSet  = bytearray((
				DpTelegram_SetPrm_Req.DPV1PRM0_FAILSAFE,
				DpTelegram_SetPrm_Req.DPV1PRM1_REDCFG,
				0x00))
		#	slaveDesc.setUserPrmData(
		        print(str(slaveConf.gsd.getUserPrmData(dp1PrmMask=dp1PrmMask,
							     dp1PrmSet=dp1PrmSet)))
			master.addSlave(slaveDesc)

This piece of code is absolutely the same in my python script and pyprofibus-linuxcnc-hal. They lives in the same folder and uses the same config/gsd files. GSDs and config are attached.

SIEM804F.gsd.zip

connecting Pyprofibus with DP/PA coupler to communcate with PA devices (Invalid telegram format)

Hello.

to start with, I am a novice in Profibus. I am working on a project to connected pyprofibus to DP/PA coupler so that i can communicate with some PA devices through it. I have been faced with some problem which I would really appreciate if i can get some help to start.

The main error i am getting now is
PHY-serial: TX 10 10 01 49 5A 16
PHY-serial: RX (fragment) E7 A7 DA
DPM1: RX error: PHY-serial: Failed to get received telegram size: Invalid telegram format.

I am using a raspberry pi as master and rs485 to rs232 transceiver and i configured my baudrate to be 45450 baud. That is the baud that DP/PA coupler support. I feel maybe my problem might be from the physical transceiver but then I saw that pyprofibus automatically reduce some devices baudrate down to 9600,19200.

anyhelp to debug this error would be appreciated.

Regards.

Getting telegram error

Hello
I am working with profibus on RS485 with a PLC S7-315 running with a speed of 9600bps.
I tried to get data on my PC by using RS485 to USB adaptaters and pyprofibus.
I can't get any profibus valid Profibus data."
Is there a compatibility list of adapters which work with pryprofibus ?I also try to get data with a tiny FPGA but I can't figure how to connect the pyprofibus to the tiny FPGA board.
Is there some document to help me ?

[Question] how to read data without write ?

Hi,

I'm a profibus noob but I'm using this library to communicate with profibus slave based on Anybus-S Profibus card. So this is more of a profibus general question.
The slave expects to receive 1 byte and outputs 16 bytes. What I need is to first read the output data before I do the first write (write data depends on what slave outputs). Is this even possible in profibus ? if Yes, how to do that with pyprofibus ?

Standalone Profibus slave with communication through virtual serial ports.

Hi there!

I found this library, and it looks perfect since I would like to implement a Profibus Master in Python. However, I would also like to setup a standalone Profibus slave in order to test the implementation of my master. In the end, I would like to have the master and the slave communicate through virtual serial ports. Is this possible to achieve using this library?

I'm looking forward to hear any thoughts about this.

Regards,
Victor

TxDen pin Question

Hello
I can't find any description where to connect the TxDen pin if using a raspberry pi?

Modular_Station=0: Wait for Data_Exchange-ready won't proceed to Data Exchange stage

Hello,
I have an issue I have not been able to solve that I'd like to share.

I have ported the Profibus Slave originally intended for the Texas Instruments Industrial Communication Development Boards to run on a Beaglebone Black (BBB) SBC. This is, as far as I know, the most affordable Profibus slave one can get and, in that economic sense a perfect match for pyprofibus.

Unfortunately, I have not been able to make them talk together. The slave works fine out of the box with the default GSD file using a PLC as a master but when I wire it to my laptop and try to connect with pyprofibus it gets stuck in a loop going from waiting for data_exchange-ready to the initial state instead of proceeding to the data exchange stage.

This is the log I got:

DPM1: Trying to initialize slave 2...
PHY-serial: TX   10 02 63 49 AE 16
PHY-serial: RX   10 63 02 00 65 16
DPM1: slave[02].state --> 'wait for diag'
DPM1: Requesting Slave_Diag from slave 2...
PHY-serial: TX   68 05 05 68 82 E3 6D 3C 3E 4C 16
PHY-serial: RX   68 0B 0B 68 E3 82 08 3E 3C 02 05 00 FF 0C DA D3 16
DPM1: slave[02].state --> 'wait for Prm'
DPM1: Sending Set_Prm to slave 2...
PHY-serial: TX   68 0F 0F 68 82 E3 5D 3D 3E B8 05 01 00 0C DA 01 40 00 00 22 16
PHY-serial: RX   E5
DPM1: slave[02].state --> 'wait for Cfg'
DPM1: Sending Chk_Cfg to slave 2...
PHY-serial: TX   68 05 05 68 82 E3 7D 3E 3E 5E 16
PHY-serial: RX   E5
DPM1: slave[02].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 2...
PHY-serial: TX   68 05 05 68 82 E3 5D 3C 3E 3C 16
PHY-serial: RX   68 0B 0B 68 E3 82 08 3E 3C 02 0C 00 63 0C DA 3E 16
PHY-serial: TX   68 05 05 68 82 E3 7D 3C 3E 5C 16
PHY-serial: RX   68 0B 0B 68 E3 82 08 3E 3C 02 05 00 FF 0C DA D3 16
DPM1: slave[02].state --> 'init'
DPM1: Trying to initialize slave 2...

...and repeats in a loop...

As you can see, the problem is the slave answers to the diagnostics telegram raising the Stat_Diag bit and in the second attempt it comes back with the master address reset at 0xFF indicating its configuration needs to be updated (although the master address was correct in the first telegram, 0x63).

I've tried to change the configuration every possible way but after a couple of days, I think my next shot will be to use a sniffer to monitor the connection to a PLC master. In the meantime maybe there is something obvious I'm missing... The slave side is a library and debugging it is quite a slow process (I mean trying to find the mismatch in the configuration from the slave side).

Some additional info on my setup:

-TI Profibus Slave Demo Wiki page. I don't have Profitrace but I assume my setup should work exactly the same as TI's ICCS board.

-Python, conf and GSD files can be found in this repo. I will be uploading all binaries and source there soon.

Thank you.

No module named 'pyprofibus.gsd'

When trying to import pyprofibus this error pops up:

Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

import pyprofibus
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/pyprofibus/init.py", line 4, in
from pyprofibus.conf import *
File "/usr/local/lib/python3.5/dist-packages/pyprofibus/conf.py", line 14, in
from pyprofibus.gsd.interp import GsdInterp
ImportError: No module named 'pyprofibus.gsd'

Steps I did

clone pyprofibus, then run ./setup.py install
When I stay on the same console and open a python interpreter I am able to import pyprofibus.
When I try the same in another console or from pyCharms it throws the above error

Same happens when trying to use awlsim with pyprofibus. (When hitting Download source)

Function code response error handling needs improvement

Not all function responses can currently be handled. For example, I have a device that outputs FC code 0x2 (RR, resource error) after two weeks of operation. Pyprofibus doesn't notice and just outputs a datagram with empty data.

"input byte, "output byte" confusion

We have quickly touched on this in my earlier issues. I've had another look at this:

; The number of output bytes this slave transmits to the
; master in Data_Exchange.
; This usually depends on the modules plugged into the slave.
output_size=2

; The number of input bytes this slave expects to receive
; in Data_Exchange.
; This usually depends on the modules plugged into the slave.
input_size=0

Still seems wrong to me. My Festo Valve block expects 2 bytes FROM the master and transmits 0 bytes TO the master. So if the above is defined as viewed from the slave then "output_size" should be "0" and "input_size" should be "2". If it's defined as viewed from the master then the comments should be swapped.

CP5711: Is this CP supported?

; Only for type=serial:
; The PHY device name/path.
; Can be a device like /dev/ttyS0 or /dev/ttyAMA0
dev=/dev/ttyS0

what is this setting we should give in windows machine when we have PB card ? how and where can we find this?

I'm using CP5711 card to connect my PB device what should be the parameter in this case ?

Working over Ethernet

Hello,
I found your library and it looks great!
After looking around, I see that only serial interfaces are supported (or did I miss something?).

Do you think it would be a big issue to support Ethernet as well?
This would be the preferred mode of communication for my PLC project.

Thanks,
Joel

Siemens DP/AS-i LINK 20 support

Hello!
I'm trying to connect to siemens DP/AS link, but recieve
DPM1: RX error: PHY-serial: Failed to get received telegram size: Invalid telegram format.
GSD parser comes with a lot of warning about unknown lines Value(1) and BitArea(X-Y), and the separate warning Warning in GSD 'DP-ASi-LINK_20/SIEM804F.gsd': DPv1 User_Prm_Data override ignored.
As far as i understood, the problem is caused by User_Prm_Data attribute, it is specefied twice: in SIEM804F.GSD and in example_dummy.py in slaveDesc.setUserPrmData line. How should i add a slave with UserPrmData, exported from GSD file ? Where can i look at the real received telegram size?

Help with WAGO 750-343

Hello
I'm trying to get the WAGO 750-343 module with I/O modules to work, but I lack knowledge of Profibus
The Pyprofibus is talking to the module but the slave only reports Configuration error
I went trough the .conf file but i'm stuck
I used the et200s example and modified it. I downloaded the GSD file for the 750-343 module and defined the connected I/O modules but it still does not work.

The .conf file:

; ----------------------------------------------- ;
;                                                 ;
; PROFIBUS configuration                          ;
;                                                 ;
; This file configures a pyprofibus instance.     ;
;                                                 ;
; ----------------------------------------------- ;


; General settings
[PROFIBUS]

; Enable/disable debug mode.
; 0 -> no debugging.
; 1 -> DP debugging.
; 2 -> DP and PHY debugging.
debug=2


; PHY protocol layer configuration
[PHY]

; The PHY layer driver type.
type=serial
;type=fpga
;type=dummy_slave

; Only for type=serial:
; The PHY device name/path.
; Can be a device like /dev/ttyS0 or /dev/ttyAMA0
dev=/dev/ttyAMA0

; Only for type=serial:
; Serial line flow control and handshaking
rtscts=False
dsrdtr=False

; Only for type=fpga:
; SPI bus (to PHY FPGA) configuration.
spiBus=0
spiCS=0
spiSpeedHz=2500000

; The Profibus on-wire baud rate.
;baud=9600
baud=19200
;baud=45450
;baud=93750
;baud=187500
;baud=500000
;baud=1500000
;baud=3000000
;baud=6000000
;baud=12000000


; FDL protocol layer configuration
[FDL]


; DP protocol layer configuration
[DP]

; The master device class. Either 1 or 2.
master_class=1

; The Profibus address of this device.
master_addr=2


; ---
; Slave configurations
; Add as many [SLAVE_xxx] sections as needed.
; ---

; First slave configuration
[SLAVE_0]

; Optional slave name. Will be stored in slaveConf.name and slaveDesc.name.
; pyprofibus does not use the name internally.
name=750-343

; This slave's Profibus address
addr=8

; The path to the GSD file.
gsd=b757_p23.gsd

; Boolean: Sync mode enabled/available?
sync_mode=1

; Boolean: Freeze mode enabled/available?
freeze_mode=1

; 8 bit integer specifying the Profibus group ident mask.
group_mask=1

; This slave's watchdog timeout, in milliseconds.
watchdog_ms=300

; Module configuration.
; For each module plugged into the slave, add a module_xxx
; entry with the name of the module.
; The module name must match the name from the GSD file (approximately).
; The modules are used in the order of the index number.
module_0=750-610 P-Einsp. 24V DC/DIA
module_1=75x-430 8DI/24V DC/3.0ms
module_2=75x-430 8DI/24V DC/3.0ms 
;module_3=75x-430 8DI/24V DC/3.0ms 
;module_4=75x-430 8DI/24V DC/3.0ms 
;module_5=75x-430 8DI/24V DC/3.0ms 
;module_6=75x-430 8DI/24V DC/3.0ms 
;module_7=75x-530 8DO/24V DC/0.5A
;module_8=75x-530 8DO/24V DC/0.5A 
;module_9=75x-530 8DO/24V DC/0.5A 
;module_10=75x-530 8DO/24V DC/0.5A 
;module_11=75x-530 8DO/24V DC/0.5A 
;module_12=75x-530 8DO/24V DC/0.5A 
;module_13=75x-530 8DO/24V DC/0.5A 

; The number of output bytes this slave transmits to the
; master in Data_Exchange.
; This usually depends on the modules plugged into the slave.
output_size=2

; The number of input bytes this slave expects to receive
; in Data_Exchange.
; This usually depends on the modules plugged into the slave.
input_size=2

; Request and interpret a slave diagnosis every n Data_Exchange telegrams.
; n defaults to 0, which means: Never periodically request diagnosis.
; If periodic diagnosis is switched off, then diagnostic information will only be requested on faults.
; Note that input-only slaves (output_size=0) probably need a non-zero diag_period.
diag_period=0

Terminal output:

DPM1: Trying to initialize slave 8...
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: RX   10 02 08 00 0A 16
DPM1: slave[08].state --> 'Wait for diag'
DPM1: Requesting Slave_Diag from slave 8...
PHY-serial: TX   68 05 05 68 88 82 6D 3C 3E F1 16
PHY-serial: RX   68 1B 1B 68 82 88 08 3E 3C 4A 05 00 FF B7 57 49 00 00 00 00 00 00 00 00 07 A0 00 00 82 02 00 5C 16
DPM1: slave[08].state --> 'Wait for Prm'
DPM1: Sending Set_Prm to slave 8...
PHY-serial: TX   68 28 28 68 88 82 5D 3D 3E B8 1E 01 00 B7 57 01 40 01 00 00 00 00 00 02 00 C3 43 00 00 00 01 00 00 00 00 20 00 00 23 01 00 23 01 00 7A 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'Wait for Cfg'
DPM1: Sending Chk_Cfg to slave 8...
PHY-serial: TX   68 08 08 68 88 82 7D 3E 3E 00 10 10 23 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 5D 3C 3E E1 16
PHY-serial: RX   68 1B 1B 68 82 88 08 3E 3C 4A 05 00 FF B7 57 49 00 00 00 00 00 00 00 00 07 A0 00 00 82 02 00 5C 16
DPM1:  >ERROR<  Slave 8 reports a faulty parameterization (Set_Prm).
DPM1: Slave 8 requests a new parameterization (Set_Prm).
DPM1: slave[08].state --> 'Init'
DPM1: Trying to initialize slave 8...
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: RX   10 02 08 00 0A 16
DPM1: slave[08].state --> 'Wait for diag'
DPM1: Requesting Slave_Diag from slave 8...
PHY-serial: TX   68 05 05 68 88 82 7D 3C 3E 01 16
PHY-serial: RX   68 1B 1B 68 82 88 08 3E 3C 4A 05 00 FF B7 57 49 00 00 00 00 00 00 00 00 07 A0 00 00 82 02 00 5C 16
DPM1: slave[08].state --> 'Wait for Prm'
DPM1: Sending Set_Prm to slave 8...
PHY-serial: TX   68 28 28 68 88 82 5D 3D 3E B8 1E 01 00 B7 57 01 40 01 00 00 00 00 00 02 00 C3 43 00 00 00 01 00 00 00 00 20 00 00 23 01 00 23 01 00 7A 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'Wait for Cfg'
DPM1: Sending Chk_Cfg to slave 8...
PHY-serial: TX   68 08 08 68 88 82 7D 3E 3E 00 10 10 23 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 5D 3C 3E E1 16
PHY-serial: RX   68 1B 1B 68 82 88 08 3E 3C 4A 05 00 FF B7 57 49 00 00 00 00 00 00 00 00 07 A0 00 00 82 02 00 5C 16
DPM1:  >ERROR<  Slave 8 reports a faulty parameterization (Set_Prm).
DPM1: Slave 8 requests a new parameterization (Set_Prm).
DPM1: slave[08].state --> 'Init'
DPM1: Trying to initialize slave 8...

I would appreciate any help

Thank you

How to start with real hardware and GSD file?

Hi Michael,

I would like to test your profibus on my hardware (Mass Flow Controller Brooks Instrument SLA5800).

I have a gsd file, I see that you use conf file in your examples, how to generate it with my rs485 bus config?

Thanks,

Antoine

After slave was reset/reloaded timeout occurs and slave-object changes its state to STATE_INIT, but its fcb remained in previous state ( fcv=1 fcb=0/1 )

Because of that master sends Set Prm to reloaded/reset slave with wrong fcv/fcb (fcv=1, fcb=x). Slave expects (fcv=0 fcb=1).
Proposal : add

class DpSlaveState(object):
	def setState(self, state, stateTimeLimit=None):
                ...
		if state == self.STATE_INIT:
			**self.fcb.resetFCB()** 
			self.dxCycleRunning = False

In order this to work, attribute DpSlaveState.fcb should be initialized before initial call to setState() in init()

class DpSlaveState(object):
	def __init__(self, master, slaveDesc):
		self.fcb = FdlFCB()
		self.setState(self.STATE_INIT)

GSD file reading error.

im trying to use this file; ABB0959.gsd.

when reading it in i get alot of error messages. is this because some gsd functionality is still missing in this sw? will this cause trouble in getting comm running?

its a little hard to troubleshoot, due to gsd editor and profibus std is for members only, cost money.

errors:
GSD parser warning in 'ABB0959.gsd' at line 39:
Info_Text = "PROFIBUS DP communication option FPBA-01 with DP-V0 interface in ABB Drives"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 44:
FMS_supp = 0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 114:
Bitmap_Diag = "FPBAmapD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 124:
Unit_Diag_Bit(0) = "Host communication lost"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 228:
Bit(7) 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 233:
Bit(6) 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 238:
Bit(5) 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 243:
Bit(2) 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 248:
BitArea(0-2) 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 253:
Bit(3) 1 1-1
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 260:
Unsigned8 30 30-30
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 265:
Unsigned8 129 129-129
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 270:
Unsigned8 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 275:
Unsigned8 0 0-0
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 279:
BitArea(0-1) 0 0-2
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 284:
BitArea(2-3) 0 0-1
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 289:
Unsigned16 30 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 293:
Unsigned16 1150 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 297:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 301:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 305:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 309:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 313:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 317:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 321:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 325:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 329:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 333:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 337:
Unsigned16 0 0-65535
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 441:
1
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 442:
Info_Text = "FPBA-01, PPO Type 1, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 446:
2
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 447:
Info_Text = "FPBA-01, PPO Type 2, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 451:
3
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 452:
Info_Text = "FPBA-01, PPO Type 3, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 456:
4
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 457:
Info_Text = "FPBA-01, PPO Type 4, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 461:
5
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 462:
Info_Text = "FPBA-01, PPO Type 5, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 466:
6
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 467:
Info_Text = "FPBA-01, PPO Type 6, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 471:
7
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 472:
Info_Text = "FPBA-01, PPO Type 7, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 476:
8
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 477:
Info_Text = "FPBA-01, PPO Type 8, Data Consistent"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 481:
9
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 482:
Info_Text = "FPBA-01, PPO Type 2, 4 PKW + (2+2+2) PZD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 486:
10
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 487:
Info_Text = "FPBA-01, PPO Type 4, 0 PKW + (2+2+2) PZD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 491:
11
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 492:
Info_Text = "FPBA-01, PPO Type 5, 4 PKW + (2+2+2+2+2) PZD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 496:
12
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 497:
Info_Text = "FPBA-01, PPO Type 6, 0 PKW + (2+2+2+2+2) PZD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 501:
13
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 502:
Info_Text = "FPBA-01, PPO Type 7, 4 PKW +(2+2+2+2+2+2) PZD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 506:
14
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 507:
Info_Text = "FPBA-01, PPO Type 8,0 PKW +(2+2+2+2+2+2) PZD"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 511:
15
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 512:
Info_Text = "FPBA-01, PPO Type 1, 4 PKW + 2 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 516:
16
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 517:
Info_Text = "FPBA-01, PPO Type 2, 4 PKW + 6 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 521:
17
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 522:
Info_Text = "FPBA-01, PPO Type 3, 0 PKW + 2 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 526:
18
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 527:
Info_Text = "FPBA-01, PPO Type 4, 0 PKW + 6 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 531:
19
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 532:
Info_Text = "FPBA-01, PPO Type 5, 4 PKW + 10 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 536:
20
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 537:
Info_Text = "FPBA-01, PPO Type 6, 0 PKW + 10 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 541:
21
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 542:
Info_Text = "FPBA-01, PPO Type 7, 4 PKW + 12 PZD (No data consistency)"
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 546:
22
--> Ignored unknown line
GSD parser warning in 'ABB0959.gsd' at line 547:
Info_Text = "FPBA-01, PPO Type 8, 0 PKW + 12 PZD (No data consistency)"
--> Ignored unknown line

Festo CPV Valve terminal

Hi
I'm quite new to Profibus and I'm trying to connect LinuxCNC to a Festo CPV valve terminal. Communication is established through a built in RS485 port, however there are timeouts during 'data_exchange'.
So it seems I'm missing something and I'd appreciate it if you could look this over and maybe point me in the right direction.
Thanks.

Terminal output:

user@optiplex7010:~/linuxcnc-master-02072021/configs/pyprofibus-master/linuxcnc-demo-cpv10-ge$ ./run-linuxcnc-demo.sh 
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/user/linuxcnc-master-02072021/configs/pyprofibus-master/linuxcnc-demo-cpv10-ge/.'
Machine configuration file is 'linuxcnc-demo.ini'
Starting LinuxCNC...
emc/iotask/ioControl.cc 769: can't load tool table.
Found file(REL): ./linuxcnc-demo.hal
Note: Using POSIX realtime
Unexpected realtime delay on task 0 with period 20000
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
Found file(REL): ./profibus.hal
GSD parser warning in 'cpv_0A35.gse' at line 14:
FMS_supp            = 0
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 63:
Unit_Diag_Bit(8)    = "CPI-connection to output modul"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 64:
Unit_Diag_Bit(9)    = "CPI-connection to input modul"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 65:
Unit_Diag_Bit(10)   = "short circuit / overload output"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 66:
Unit_Diag_Bit(11)   = "power load failure output module"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 67:
Unit_Diag_Bit(12)   = "sensor power supply < 10V"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 68:
Unit_Diag_Bit(13)   = "valve power supply < 20.4V"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 69:
Unit_Diag_Bit(14)   = "valve power supply < 10V"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 70:
Unit_Diag_Bit(15)   = "no update-mode"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 71:
Unit_Diag_Bit(16)   = "failure main module"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 72:
Unit_Diag_Bit(17)   = "failure 1. CP- module"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 73:
Unit_Diag_Bit(18)   = "failure 2. CP- module"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 74:
Unit_Diag_Bit(19)   = "failure 3. CP- module"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 75:
Unit_Diag_Bit(20)   = "failure 4. CP- module"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 95:
Bit(1) 1 0-1
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 100:
Bit(7) 1 0-1
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 105:
BitArea(0-1) 0 0-2
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 110:
unsigned8 0 0-255
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 114:
unsigned16 0 0-65535
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 118:
unsigned32 0 0-16777215
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 122:
unsigned32 0 0-4294967295
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 126:
unsigned8 91 0-255
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 132:
Info_Text = "Base unit CPV-SC with 16 digital outputs (valve coils)"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 133:
1
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 143:
Info_Text = "String extension with 8 digital outputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 144:
2
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 153:
Info_Text = "String extension with 16 digital outputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 154:
3
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 163:
Info_Text = "String extension with 24 digital outputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 164:
4
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 173:
Info_Text = "String extension with 32 digital outputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 174:
5
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 183:
Info_Text = "String extension with 8 digital inputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 184:
6
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 191:
Info_Text = "String extension with 16 digital inputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 192:
7
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 199:
Info_Text = "String extension with 24 digital inputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 200:
8
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 207:
Info_Text = "String extension with 32 digital inputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 208:
9
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 215:
Info_Text = "tool change mode with 32 inputs and 32 outputs"
 --> Ignored unknown line
GSD parser warning in 'cpv_0A35.gse' at line 216:
10
 --> Ignored unknown line
pyprofibus: DP slave 8 output: 2 bytes
pyprofibus: DP slave 8 input:  0 bytes
Warning in GSD 'cpv_0A35.gse': DPv1 User_Prm_Data override ignored
pyprofibus: Running PROFIBUS-DP master...
pyprofibus: ready.
pyprofibus: Active DP slave (addr=8) pins:
pyprofibus: DP output:  profibus.slave.8.output.bit.0.0
pyprofibus: DP output:  profibus.slave.8.output.bit.0.1
pyprofibus: DP output:  profibus.slave.8.output.bit.0.2
pyprofibus: DP output:  profibus.slave.8.output.bit.0.3
pyprofibus: DP output:  profibus.slave.8.output.bit.0.4
pyprofibus: DP output:  profibus.slave.8.output.bit.0.5
pyprofibus: DP output:  profibus.slave.8.output.bit.0.6
pyprofibus: DP output:  profibus.slave.8.output.bit.0.7
pyprofibus: HAL configuration done
DPM1: Trying to initialize slave 8...
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: RX   10 02 08 00 0A 16
DPM1: slave[08].state --> 'wait for diag'
DPM1: Requesting Slave_Diag from slave 8...
PHY-serial: TX   68 05 05 68 88 82 6D 3C 3E F1 16
note: MAXV     max: 30.000 units/sec 1800.000 units/min
note: LJOG     max: 30.000 units/sec 1800.000 units/min
note: LJOG default: 10.000 units/sec 600.000 units/min
note: jog_order='XYZ'
note: jog_invert=set([])
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 02 05 00 FF 0A 35 D1 16
DPM1: slave[08].state --> 'wait for Prm'
DPM1: Sending Set_Prm to slave 8...
PHY-serial: TX   68 13 13 68 88 82 5D 3D 3E B8 1E 01 00 0A 35 01 00 00 00 82 00 00 00 7B 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'wait for Cfg'
DPM1: Sending Chk_Cfg to slave 8...
PHY-serial: TX   68 06 06 68 88 82 7D 3E 3E 21 24 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 5D 3C 3E E1 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 00 0C 00 02 0A 35 D9 16
DPM1: slave[08].state --> 'Data_Exchange'
DPM1: Initialization finished. Running Data_Exchange with slave 8...
PHY-serial: TX   68 05 05 68 08 02 7D 01 00 88 16
PHY-serial: RX   E5
DPM1: Data_Exchange timeout with slave 8
PHY-serial: TX   68 05 05 68 08 02 7D 00 00 87 16
PHY-serial: RX   E5
DPM1: Data_Exchange timeout with slave 8
DPM1: Data_Exchange timeout with slave 8
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[08].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 7D 3C 3E 01 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 02 05 00 FF 0A 35 D1 16
DPM1: Slave 8 requests a new parameterization (Set_Prm).
DPM1: slave[08].state --> 'init'
DPM1: Trying to initialize slave 8...
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: RX   10 02 08 00 0A 16
DPM1: slave[08].state --> 'wait for diag'
DPM1: Requesting Slave_Diag from slave 8...
PHY-serial: TX   68 05 05 68 88 82 5D 3C 3E E1 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 02 05 00 FF 0A 35 D1 16
DPM1: slave[08].state --> 'wait for Prm'
DPM1: Sending Set_Prm to slave 8...
PHY-serial: TX   68 13 13 68 88 82 7D 3D 3E B8 1E 01 00 0A 35 01 00 00 00 82 00 00 00 9B 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'wait for Cfg'
DPM1: Sending Chk_Cfg to slave 8...
PHY-serial: TX   68 06 06 68 88 82 5D 3E 3E 21 04 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 7D 3C 3E 01 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 00 0C 00 02 0A 35 D9 16
DPM1: slave[08].state --> 'Data_Exchange'
DPM1: Initialization finished. Running Data_Exchange with slave 8...
PHY-serial: TX   68 05 05 68 08 02 5D 01 00 68 16
PHY-serial: RX   E5
DPM1: Data_Exchange timeout with slave 8
PHY-serial: TX   68 05 05 68 08 02 5D 00 00 67 16
PHY-serial: RX   E5
DPM1: Data_Exchange timeout with slave 8
DPM1: Data_Exchange timeout with slave 8
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[08].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 5D 3C 3E E1 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 02 05 00 FF 0A 35 D1 16
DPM1: Slave 8 requests a new parameterization (Set_Prm).
DPM1: slave[08].state --> 'init'
DPM1: Trying to initialize slave 8...
PHY-serial: TX   10 08 02 49 53 16
PHY-serial: RX   10 02 08 00 0A 16
DPM1: slave[08].state --> 'wait for diag'
DPM1: Requesting Slave_Diag from slave 8...
PHY-serial: TX   68 05 05 68 88 82 7D 3C 3E 01 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 02 05 00 FF 0A 35 D1 16
DPM1: slave[08].state --> 'wait for Prm'
DPM1: Sending Set_Prm to slave 8...
PHY-serial: TX   68 13 13 68 88 82 5D 3D 3E B8 1E 01 00 0A 35 01 00 00 00 82 00 00 00 7B 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'wait for Cfg'
DPM1: Sending Chk_Cfg to slave 8...
PHY-serial: TX   68 06 06 68 88 82 7D 3E 3E 21 24 16
PHY-serial: RX   E5
DPM1: slave[08].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 5D 3C 3E E1 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 00 0C 00 02 0A 35 D9 16
DPM1: slave[08].state --> 'Data_Exchange'
DPM1: Initialization finished. Running Data_Exchange with slave 8...
PHY-serial: TX   68 05 05 68 08 02 7D 00 00 87 16
PHY-serial: RX   E5
DPM1: Data_Exchange timeout with slave 8
PHY-serial: TX   68 05 05 68 08 02 7D 01 00 88 16
PHY-serial: RX   E5
DPM1: Data_Exchange timeout with slave 8
DPM1: Data_Exchange timeout with slave 8
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[08].state --> 'wait for Data_Exchange-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 8...
PHY-serial: TX   68 05 05 68 88 82 7D 3C 3E 01 16
PHY-serial: RX   68 0B 0B 68 82 88 08 3E 3C 00 0C 00 02 0A 35 D9 16
DPM1: slave[08].state --> 'Data_Exchange'
DPM1: Initialization finished. Running Data_Exchange with slave 8...
PHY-serial: TX   68 05 05 68 08 02 5D 00 00 67 16
PHY-serial: RX   10 02 08 03 0D 16
pyprofibus: PROFIBUS fault:
Service not active on slave 8
DPM1: Data_Exchange timeout with slave 8
PHY-serial: TX   68 05 05 68 08 02 7D 00 00 87 16
PHY-serial: RX   10 02 08 03 0D 16
pyprofibus: Fatal fault detected
pyprofibus: Fatal PROFIBUS fault:
Service not active on slave 8
pyprofibus: LinuxCNC HAL module shutdown.

The gsd file:

;*****************************************************************************;
; Geraetestammdatei fuer CPV-Ventilinsel mit direktem Profibus DP-Anschluß   ;
; Hersteller: Fa. FESTO AG&Co., Ruiterstrasse 82, 73734 Esslingen             ;
; 	FESTO Hotline-Tel.: 0711/347-3000                                           ;
;*****************************************************************************;
#Profibus_DP
GSD_Revision        = 5
Vendor_Name         = "Festo AG&Co."
Model_Name          = "Festo CPV-DI02"
Revision            = "28.06.06"
Ident_Number        = 0x0A35
Protocol_Ident      = 0
Station_Type        = 0
FMS_supp            = 0
Hardware_Release    = "12.05"
Software_Release    = "V1.3"
;
9.6_supp            = 1
19.2_supp           = 1
93.75_supp          = 1
187.5_supp          = 1
500_supp            = 1
1.5M_supp           = 1
3M_supp             = 1
6M_supp             = 1
12M_supp            = 1
;
MaxTsdr_9.6         = 20
MaxTsdr_19.2        = 20
MaxTsdr_93.75       = 20
MaxTsdr_187.5       = 20
MaxTsdr_500         = 20
MaxTsdr_1.5M        = 25
MaxTsdr_3M          = 50
MaxTsdr_6M          = 100
MaxTsdr_12M         = 200
;
Redundancy          = 0
Repeater_Ctrl_Sig   = 2
24V_Pins            = 0
Implementation_Type = "SPC3"
Bitmap_Device       = "pb_dicpn"
;Bitmap_Diag         = "pb_dicpd"
;Bitmap_SF           = "pb_dicps"
;
Freeze_Mode_supp    = 1
Sync_Mode_supp      = 1
Auto_Baud_supp      = 1
Set_Slave_Add_supp  = 0
Min_Slave_Intervall = 0x0005
;
Modular_Station     = 1
Max_Module          = 0x05
Max_Input_Len       = 0x04
Max_Output_Len      = 0x06
Max_Data_Len        = 0x000A
Modul_Offset        = 1
;
Fail_Safe           = 0
Slave_Family        = 4
Max_Diag_Data_Len   = 0x0010
;
Unit_Diag_Bit(8)    = "CP-Anschluss zu Ausgangsmodul"
Unit_Diag_Bit(9)    = "CP-Anschluss zu Eingangsmodul"
Unit_Diag_Bit(10)   = "Kurzschluss/Ueberlast Ausgang"
Unit_Diag_Bit(11)   = "Lastspg.ausfall Ausgangsmodul"
Unit_Diag_Bit(12)   = "Sensorversorgung < 10V"
Unit_Diag_Bit(13)   = "Versorgungsspg.Ventile < 20.4V"
Unit_Diag_Bit(14)   = "Versorgungsspg.Ventile < 10V"
Unit_Diag_Bit(15)   = "kein Update-Betrieb"
Unit_Diag_Bit(16)   = "Fehler Basismodul"
Unit_Diag_Bit(17)   = "Fehler 1. CP- Modul"
Unit_Diag_Bit(18)   = "Fehler 2. CP- Modul"
Unit_Diag_Bit(19)   = "Fehler 3. CP- Modul"
Unit_Diag_Bit(20)   = "Fehler 4. CP- Modul"
;
Max_User_Prm_Data_Len = 0x1E

;------------------Definition der Parametertexte-----------------

PrmText = 1 	                             ; Referenznummer 1
Text(0) = "inaktiv"
Text(1) = "aktiv"
EndPrmText 

PrmText = 2                              	; Referenznummer 2
Text(0) = "Ausgaenge zuruecksetzen"
Text(1) = "Ausgaenge Fault Mode"
Text(2) = "Ausgaenge Hold Last State"
EndPrmText



ExtUserPrmData = 1 "Monitor U-Last"                      ; Referenznummer 1
Bit(1) 1 0-1                                          	; Default = 1, Min = 0, Max = 1
Prm_Text_Ref = 1		                           ; Verweis auf Text-Definition 1
EndExtUserPrmData

ExtUserPrmData = 2 "Monitor Fehler CP-Line"                      ; Referenznummer 2
Bit(7) 1 0-1                                          	; Default = 1, Min = 0, Max = 1
Prm_Text_Ref = 1		                           ; Verweis auf Text-Definition 1
EndExtUserPrmData

ExtUserPrmData = 3 "Fault Mode"                  ; Referenznummer 3
BitArea(0-1) 0 0-2                                          ; Default = 0, Min = 0, Max = 3
Prm_Text_Ref = 2                                           ; Verweis auf Text-Definition 2
EndExtUserPrmData

ExtUserPrmData = 4 "Fault State 1byte"              ; Referenznummer 4
unsigned8 0 0-255                                        ; Default = 0, Min = 0, Max = 255
EndExtUserPrmData

ExtUserPrmData = 5 "Fault State 2byte"              ; Referenznummer 5
unsigned16 0 0-65535                                        ; Default = 0, Min = 0, Max = 65535
EndExtUserPrmData

ExtUserPrmData = 7 "Fault State 3byte"              ; Referenznummer 7
unsigned32 0 0-16777215                             ; Default = 0, Min = 0, Max = 16777215
EndExtUserPrmData

ExtUserPrmData = 8 "Fault State 4byte"              ; Referenznummer 8
unsigned32 0 0-4294967295                            ; Default = 0, Min = 0, Max = 4294967295
EndExtUserPrmData

ExtUserPrmData = 6 "Parameterbyte"                 ; Referenznummer 6
unsigned8 91 0-255                                 ; Default = 91, Min = 0, Max = 255
EndExtUserPrmData

;-------------------- Modultypen -------------------------
; <Module-Definition-List>
Module = "Basis:16DA" 0x21
1
Ext_Module_Prm_Data_Len = 7
Ext_User_Prm_Data_Const(0) = 0x00, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00
Ext_User_Prm_Data_Ref(3) = 1
Ext_User_Prm_Data_Ref(3) = 2
Ext_User_Prm_Data_Ref(4) = 3
Ext_User_Prm_Data_Ref(5) = 5
EndModule

Module = "CP-A08" 0x20
2
Ext_Module_Prm_Data_Len = 3
Ext_User_Prm_Data_Const(0) = 0x5B, 0x00, 0x00
Ext_User_Prm_Data_Ref(0) = 6
Ext_User_Prm_Data_Ref(1) = 3
Ext_User_Prm_Data_Ref(2) = 4
EndModule

Module = "CP-A16" 0x21
3
Ext_Module_Prm_Data_Len = 4
Ext_User_Prm_Data_Const(0) = 0x5B, 0x00, 0x00, 0x00
Ext_User_Prm_Data_Ref(0) = 6
Ext_User_Prm_Data_Ref(1) = 3
Ext_User_Prm_Data_Ref(2) = 5
EndModule

Module = "CP-A24" 0x22
4
Ext_Module_Prm_Data_Len = 6
Ext_User_Prm_Data_Const(0) = 0x5B, 0x00, 0x00, 0x00, 0x00, 0x00
Ext_User_Prm_Data_Ref(0) = 6
Ext_User_Prm_Data_Ref(1) = 3
Ext_User_Prm_Data_Ref(2) = 7
EndModule

Module = "CP-A32" 0x23
5
Ext_Module_Prm_Data_Len = 6
Ext_User_Prm_Data_Const(0) = 0x5B, 0x00, 0x00, 0x00, 0x00, 0x00
Ext_User_Prm_Data_Ref(0) = 6
Ext_User_Prm_Data_Ref(1) = 3
Ext_User_Prm_Data_Ref(2) = 8
EndModule

Module = "CP-E08" 0x10
6
Ext_Module_Prm_Data_Len = 1
Ext_User_Prm_Data_Const(0) = 0x5B
Ext_User_Prm_Data_Ref(0) = 6
EndModule

Module = "CP-E16" 0x11
7
Ext_Module_Prm_Data_Len = 1
Ext_User_Prm_Data_Const(0) = 0x5B
Ext_User_Prm_Data_Ref(0) = 6
EndModule

Module = "CP-E24" 0x12
8
Ext_Module_Prm_Data_Len = 1
Ext_User_Prm_Data_Const(0) = 0x5B
Ext_User_Prm_Data_Ref(0) = 6
EndModule

Module = "CP-E32" 0x13
9
Ext_Module_Prm_Data_Len = 1
Ext_User_Prm_Data_Const(0) = 0x5B
Ext_User_Prm_Data_Ref(0) = 6
EndModule

Module = "Werkzeugw. A/E:32/32" 0x33
10
Ext_Module_Prm_Data_Len = 9
Ext_User_Prm_Data_Const(0) = 0x5B, 0x5B, 0x5B, 0x5B, 0x00, 0x00, 0x00, 0x00, 0x00
Ext_User_Prm_Data_Ref(0) = 6
Ext_User_Prm_Data_Ref(1) = 6
Ext_User_Prm_Data_Ref(2) = 6
Ext_User_Prm_Data_Ref(3) = 6
Ext_User_Prm_Data_Ref(4) = 3
Ext_User_Prm_Data_Ref(5) = 8
EndModule

My config:

; ----------------------------------------------- ;
;                                                 ;
; PROFIBUS configuration                          ;
;                                                 ;
; This file configures a pyprofibus instance.     ;
;                                                 ;
; ----------------------------------------------- ;


; General settings
[PROFIBUS]
; Enable/disable debug mode.
; 0 -> no debugging.
; 1 -> DP debugging.
; 2 -> DP and PHY debugging.
debug=2


; PHY protocol layer configuration
[PHY]

; The PHY layer driver type.
type=serial

; The PHY device name/path.
; Can be a device like /dev/ttyS0 or /dev/ttyAMA0 for 'serial'.
dev=/dev/ttyS3

; The Profibus on-wire baud rate.
baud=19200


; FDL protocol layer configuration
[FDL]


; DP protocol layer configuration
[DP]

; The master device class. Either 1 or 2.
master_class=1

; The Profibus address of this device.
master_addr=2


; ---
; Slave configurations
; Add as many [SLAVE_xxx] sections as needed.
; ---

; First slave configuration
[SLAVE_0]

; Optional slave name. Will be stored in slaveConf.name and slaveDesc.name.
; pyprofibus does not use the name internally.
name=cpv10

; This slave's Profibus address
addr=8

; The path to the GSD file.
gsd=cpv_0A35.gse

; Boolean: Sync mode enabled/available?
sync_mode=1

; Boolean: Freeze mode enabled/available?
freeze_mode=1

; 8 bit integer specifying the Profibus group ident mask.
group_mask=1

; This slave's watchdog timeout, in milliseconds.
watchdog_ms=300

; Module configuration.
; For each module plugged into the slave, add a module_xxx
; entry with the name of the module.
; The module name must match the name from the GSD file (approximately).
; The modules are used in the order of the index number.
module_0=Base module:16DO

; The number of output bytes this slave transmits to the
; master in Data_Exchange.
; This usually depends on the modules plugged into the slave.
output_size=2

; The number of input bytes this slave expects to receive
; in Data_Exchange.
; This usually depends on the modules plugged into the slave.
input_size=0

`

Сonnection SIEMENS et200s

HI!
At connection to et200s I receive such answer. et200s connection status led green. I use raspberry pi 4 and cable rs232 and adapter rs232 - rs485.

DPM1: Trying to initialize slave 5...
PHY-serial: TX   10 05 02 49 50 16
PHY-serial: TX   10 05 02 49 50 16
PHY-serial: TX   10 05 02 49 50 16
PHY-serial: TX   10 05 02 49 50 16
PHY-serial: TX   10 05 02 49 50 16
PHY-serial: RX   10 02 05 00 07 16
DPM1: slave[05].state --> 'Wait for diag'
DPM1: Requesting Slave_Diag from slave 5...
PHY-serial: TX   68 05 05 68 85 82 6D 3C 3E EE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 02 05 00 FF 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 16
DPM1: slave[05].state --> 'Wait for Prm'
DPM1: Sending Set_Prm to slave 5...
PHY-serial: TX   68 29 29 68 85 82 5D 3D 3E B8 1E 01 00 80 6A 01 40 01 00 11 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 01 00 20 08 00 20 08 00 85 16
PHY-serial: RX   E5
DPM1: slave[05].state --> 'Wait for Cfg'
DPM1: Sending Chk_Cfg to slave 5...
PHY-serial: TX   68 08 08 68 85 82 7D 3E 3E 00 10 20 30 16
PHY-serial: RX   E5
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 5D 3C 3E DE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 02 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 62 16
PHY-serial: TX   68 05 05 68 85 82 7D 3C 3E FE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 00 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 16
DPM1: slave[05].state --> 'Data_Exchange'
DPM1: Initialization finished. Running Data_Exchange with slave 5...
PHY-serial: TX   68 05 05 68 05 02 5D 00 00 64 16
PHY-serial: RX   10 02 05 02 09 16
DPM1: Ignoring telegram in DataExchange with slave 5:
DpTelegram(da=0x02, sa=0x05, fc=0x02, dsap=None, ssap=None, du=Empty)
DPM1: Data_Exchange timeout with slave 5
PHY-serial: TX   68 05 05 68 05 02 7D 00 00 84 16
PHY-serial: RX   10 02 05 02 09 16
DPM1: Ignoring telegram in DataExchange with slave 5:
DpTelegram(da=0x02, sa=0x05, fc=0x02, dsap=None, ssap=None, du=Empty)
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 5D 3C 3E DE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 00 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 16
DPM1: slave[05].state --> 'Data_Exchange'
DPM1: Running Data_Exchange with slave 5...
PHY-serial: TX   68 05 05 68 05 02 7D 00 00 84 16
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 7D 3C 3E FE 16
PHY-serial: RX (fragment)   F7 72 EC
DPM1: RX error: PHY-serial: Failed to get received telegram size: Invalid telegram format.
PHY-serial: TX   68 05 05 68 85 82 7D 3C 3E FE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 00 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 16
DPM1: slave[05].state --> 'Data_Exchange'
DPM1: Running Data_Exchange with slave 5...
PHY-serial: TX   68 05 05 68 05 02 5D 00 00 64 16
PHY-serial: RX   10 02 05 02 09 16
DPM1: Ignoring telegram in DataExchange with slave 5:
DpTelegram(da=0x02, sa=0x05, fc=0x02, dsap=None, ssap=None, du=Empty)
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 7D 3C 3E FE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 00 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 16
DPM1: slave[05].state --> 'Data_Exchange'
DPM1: Running Data_Exchange with slave 5...
PHY-serial: TX   68 05 05 68 05 02 5D 00 00 64 16
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 5D 3C 3E DE 16
PHY-serial: RX (fragment)   FD FF FF
DPM1: RX error: PHY-serial: Failed to get received telegram size: Invalid telegram format.
PHY-serial: TX   68 05 05 68 85 82 5D 3C 3E DE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 00 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 16
DPM1: slave[05].state --> 'Data_Exchange'
DPM1: Running Data_Exchange with slave 5...
PHY-serial: TX   68 05 05 68 05 02 7D 00 00 84 16
PHY-serial: RX   10 02 05 02 09 16
DPM1: Ignoring telegram in DataExchange with slave 5:
DpTelegram(da=0x02, sa=0x05, fc=0x02, dsap=None, ssap=None, du=Empty)
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 5D 3C 3E DE 16
PHY-serial: RX   68 28 28 68 82 85 08 3E 3C 00 0C 00 02 80 6A 49 00 00 00 00 00 00 00 00 14 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 16
DPM1: slave[05].state --> 'Data_Exchange'
DPM1: Running Data_Exchange with slave 5...
PHY-serial: TX   68 05 05 68 05 02 7D 00 00 84 16
DPM1: Many errors in Data_Exchange. Requesting diagnostic information...
DPM1: slave[05].state --> 'Request diag and wait for DX-ready'
DPM1: Requesting Slave_Diag (WDXRDY) from slave 5...
PHY-serial: TX   68 05 05 68 85 82 7D 3C 3E FE 16
PHY-serial: RX (fragment)   BF BF 72
DPM1: RX error: PHY-serial: Failed to get received telegram size: Invalid telegram format.
PHY-serial: TX   68 05 05 68 85 82 7D 3C 3E FE 16

my example_et200s.conf

; ----------------------------------------------- ;
;                                                 ;
; PROFIBUS configuration                          ;
;                                                 ;
; This file configures a pyprofibus instance.     ;
;                                                 ;
; ----------------------------------------------- ;


; General settings
[PROFIBUS]

; Enable/disable debug mode.
; 0 -> no debugging.
; 1 -> DP debugging.
; 2 -> DP and PHY debugging.
debug=2


; PHY protocol layer configuration
[PHY]

; The PHY layer driver type.
type=serial
;type=fpga
;type=dummy_slave

; Only for type=serial:
; The PHY device name/path.
; Can be a device like /dev/ttyS0 or /dev/ttyAMA0
dev=/dev/ttyUSB0

; Only for type=serial:
; Serial line flow control and handshaking
rtscts=False
dsrdtr=False

; Only for type=fpga:
; SPI bus (to PHY FPGA) configuration.
spiBus=0
spiCS=0
spiSpeedHz=2500000

; The Profibus on-wire baud rate.
;baud=9600
baud=19200
;baud=45450
;baud=93750
;baud=187500
;baud=500000
;baud=1500000
;baud=3000000
;baud=6000000
;baud=12000000


; FDL protocol layer configuration
[FDL]


; DP protocol layer configuration
[DP]

; The master device class. Either 1 or 2.
master_class=1

; The Profibus address of this device.
master_addr=2


; ---
; Slave configurations
; Add as many [SLAVE_xxx] sections as needed.
; ---

; First slave configuration
[SLAVE_0]

; Optional slave name. Will be stored in slaveConf.name and slaveDesc.name.
; pyprofibus does not use the name internally.
name=et200s

; This slave's Profibus address
addr=5

; The path to the GSD file.
gsd=si04806a.gsg

; Boolean: Sync mode enabled/available?
sync_mode=1

; Boolean: Freeze mode enabled/available?
freeze_mode=1

; 8 bit integer specifying the Profibus group ident mask.
group_mask=1

; This slave's watchdog timeout, in milliseconds.
watchdog_ms=300

; Module configuration.
; For each module plugged into the slave, add a module_xxx
; entry with the name of the module.
; The module name must match the name from the GSD file (approximately).
; The modules are used in the order of the index number.
module_0=6ES7 138-4CA01-0AA0 PM-E DC24V
module_1=6ES7 131-4BF00-0AA0 8DI
module_2=6ES7 132-4BF00-0AA0 8DO

; The number of output bytes this slave transmits to the
; master in Data_Exchange.
; This usually depends on the modules plugged into the slave.
output_size=0

; The number of input bytes this slave expects to receive
; in Data_Exchange.
; This usually depends on the modules plugged into the slave.
input_size=2

; Request and interpret a slave diagnosis every n Data_Exchange telegrams.
; n defaults to 0, which means: Never periodically request diagnosis.
; If periodic diagnosis is switched off, then diagnostic information will only be requested on faults.
; Note that input-only slaves (output_size=0) probably need a non-zero diag_period.
diag_period=0

PC - FPGA interface

Say I wanted to interface the phy-FPGA to a RaspberryPi, would I use the SPI bus or are there other options with the provided bit file?

Acyclic communcation support

Some devices (MT M700 in this case) require acyclic communication for functionality. It'd be nice to get it implemented.

How to get to debugMsg to prompt them in Tkinker window

Good morning.
I'm working with Your delicious library pyprofibus.
I trying to make Tkiner window, by now I've made start and stop transmision from Tkinker.
Next step I would like to provide all prints from classies not to console but to Tkinker window.
I have problem with for example:

def sendData(self, telegramData, srd):
if self.__discardTimeout is not None:
return
try:
if self.debug:
self._debugMsg("TX %s" % bytesToHex(telegramData))
self.__serial.write(telegramData)
except serial.SerialException as e:
raise PhyError("PHY-serial: Failed to transmit "
"telegram:\n" + str(e))

TX message is returned in console.
self._debugMsg("TX %s" % bytesToHex(telegramData))

How can I get get to this _debugMsg to forward it to tkinker window ?

My code here: https://github.com/WojciechowskiMarek/pyprofibus2

Your sincerely
Marek Wojciechowski

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.