Commit ce758cd3 authored by Marcus Nordenberg's avatar Marcus Nordenberg

update profibus api

parent 9344a78b
This diff is collapsed.
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
#define BUILD_NUMBER 52 #define BUILD_NUMBER 52
#define BUILD_NUMBER_STR "52" #define BUILD_NUMBER_STR "52"
......
/* /******************************************************************************
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/*****************************************************************************
* * * *
* SOFTING AG * * SOFTING Industrial Automation GmbH *
* Richard-Reitzner-Allee 6 * * Richard-Reitzner-Allee 6 *
* D-85540 Haar * * D-85540 Haar *
* Phone: ++49-89-4 56 56-0 * * Phone: (++49)-(0)89-45656-0 *
* Fax: ++49-89-4 56 56-3 99 * * Fax: (++49)-(0)89-45656-399 *
* * * *
* Copyright (C) SOFTING AG 1995-2003 * * Copyright (C) SOFTING Industrial Automation GmbH 1995-2012 *
* All Rights Reserved * * All Rights Reserved *
* * * *
****************************************************************************** *******************************************************************************
FILE_NAME BUSPARAM.C FILE_NAME BUSPARAM.C
...@@ -55,25 +20,11 @@ MODULE BUSPARAM ...@@ -55,25 +20,11 @@ MODULE BUSPARAM
COMPONENT_LIBRARY PBT LIBs and DLL (16-Bit) COMPONENT_LIBRARY PBT LIBs and DLL (16-Bit)
PBTOOLS DLL (32-Bit) PBTOOLS DLL (32-Bit)
AUTHOR SOFTING AG AUTHOR SOFTING
VERSION 5.00 VERSION 5.21.0.00.release
5.01
5.02 DATE February-1998
5.10
5.11
5.20.0.00.alpha
5.20.0.00.release
5.21.0.00.release
DATE 24-November-1995
31-January-1996
14-July-1996
20-Febrary-1997
18-March-1997
30-July-1997
17-October-1997
27-February-1998
STATUS finished STATUS finished
...@@ -138,7 +89,8 @@ possible return values: ...@@ -138,7 +89,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (baud_rate) { switch (baud_rate)
{
case 0: /* 9,6 KBaud */ case 0: /* 9,6 KBaud */
case 1: /* 19,2 KBaud */ case 1: /* 19,2 KBaud */
case 2: /* 93,75 KBaud */ case 2: /* 93,75 KBaud */
...@@ -242,7 +194,8 @@ possible return values: ...@@ -242,7 +194,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (baud_rate) { switch (baud_rate)
{
case 0: /* 9,6 KBaud */ case 0: /* 9,6 KBaud */
bus_param_ptr->tsl = 100; bus_param_ptr->tsl = 100;
bus_param_ptr->min_tsdr = 30; bus_param_ptr->min_tsdr = 30;
...@@ -365,7 +318,8 @@ possible return values: ...@@ -365,7 +318,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (baud_rate) { switch (baud_rate)
{
case 0: /* 9,6 KBaud */ case 0: /* 9,6 KBaud */
bus_param_ptr->tsl = 125; bus_param_ptr->tsl = 125;
bus_param_ptr->min_tsdr = 30; bus_param_ptr->min_tsdr = 30;
...@@ -481,8 +435,8 @@ possible return values: ...@@ -481,8 +435,8 @@ possible return values:
} }
} }
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_dp_def_bus_param(IN USIGN8 baud_rate, FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_dp_def_bus_param(
IN USIGN8 station_addr, IN USIGN16 mode, IN USIGN8 baud_rate, IN USIGN8 station_addr, IN USIGN16 mode,
OUT T_DP_BUS_PARA_SET FAR* bus_param_ptr) OUT T_DP_BUS_PARA_SET FAR* bus_param_ptr)
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
...@@ -510,7 +464,8 @@ possible return values: ...@@ -510,7 +464,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
ret_val = PB_TRUE; ret_val = PB_TRUE;
switch (mode) { switch (mode)
{
case DP_MODE: /* only DP mode */ case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param); ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break; break;
...@@ -524,7 +479,8 @@ possible return values: ...@@ -524,7 +479,8 @@ possible return values:
break; break;
} }
if (ret_val == PB_TRUE) { if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */ /* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
...@@ -583,7 +539,8 @@ possible return values: ...@@ -583,7 +539,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
if (pbt_get_bus_param_for_fms(baud_rate, &bus_param)) { if (pbt_get_bus_param_for_fms(baud_rate, &bus_param))
{
/* -- set variable busparametes -------------------------------------- */ /* -- set variable busparametes -------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
...@@ -607,7 +564,9 @@ possible return values: ...@@ -607,7 +564,9 @@ possible return values:
bus_param_ptr->ident[3] = 0; bus_param_ptr->ident[3] = 0;
return (PB_TRUE); return (PB_TRUE);
} else { }
else
{
return (PB_FALSE); return (PB_FALSE);
} }
} }
...@@ -644,7 +603,8 @@ possible return values: ...@@ -644,7 +603,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (mode) { switch (mode)
{
case DP_MODE: /* only DP mode */ case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param); ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break; break;
...@@ -662,7 +622,8 @@ possible return values: ...@@ -662,7 +622,8 @@ possible return values:
break; break;
} }
if (ret_val == PB_TRUE) { if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */ /* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
...@@ -689,9 +650,9 @@ possible return values: ...@@ -689,9 +650,9 @@ possible return values:
return (ret_val); return (ret_val);
} }
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_fmb_def_bus_param(IN USIGN8 baud_rate, FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_fmb_def_bus_param(
IN USIGN8 station_addr, IN PB_BOOL in_ring_desired, IN USIGN16 mode, IN USIGN8 baud_rate, IN USIGN8 station_addr, IN PB_BOOL in_ring_desired,
OUT T_FMB_SET_BUSPARAMETER_REQ FAR* bus_param_ptr) IN USIGN16 mode, OUT T_FMB_SET_BUSPARAMETER_REQ FAR* bus_param_ptr)
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
FUNCTIONAL_DESCRIPTION FUNCTIONAL_DESCRIPTION
...@@ -720,7 +681,8 @@ possible return values: ...@@ -720,7 +681,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (mode) { switch (mode)
{
case DP_MODE: /* only DP mode */ case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param); ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break; break;
...@@ -738,7 +700,8 @@ possible return values: ...@@ -738,7 +700,8 @@ possible return values:
break; break;
} }
if (ret_val == PB_TRUE) { if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */ /* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/*****************************************************************************/ /*****************************************************************************/
/* */ /* */
/* SOFTING AG */ /* SOFTING Industrial Automation GmbH */
/* Richard-Reitzner-Allee 6 */ /* Richard-Reitzner-Allee 6 */
/* D-85540 Haar */ /* D-85540 Haar */
/* Phone: (++49)-(0)89-45656-0 */ /* Phone: (++49)-(0)89-45656-0 */
/* Fax: (++49)-(0)89-45656-399 */ /* Fax: (++49)-(0)89-45656-399 */
/* */ /* */
/* Copyright (C) SOFTING AG 1995-2003 */ /* Copyright (C) SOFTING Industrial Automation GmbH 1995-2012 */
/* All Rights Reserved */ /* All Rights Reserved */
/* */ /* */
/*****************************************************************************/ /*****************************************************************************/
...@@ -50,8 +15,8 @@ ...@@ -50,8 +15,8 @@
/* */ /* */
/* Filename : KEYWORDS.H */ /* Filename : KEYWORDS.H */
/* Version : 5.21.0.00.release */ /* Version : 5.21.0.00.release */
/* Date : 27-February-1998 */ /* Date : February-1998 */
/* Author : SOFTING AG */ /* Author : SOFTING */
/* */ /* */
/* Description : This include file defines some keywords which are used */ /* Description : This include file defines some keywords which are used */
/* for structuring and formatting the PROFIBUS source files. These */ /* for structuring and formatting the PROFIBUS source files. These */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2150,13 +2150,15 @@ Volume Profibus $ClassVolume 0.0.250.7 ...@@ -2150,13 +2150,15 @@ Volume Profibus $ClassVolume 0.0.250.7
EndObject EndObject
EndObject EndObject
!/** !/**
! @Author Claes Jurstrand ! @Author Claes Jurstrand/Marcus Nordenberg
! @Version 1.0 ! @Version 1.1
! @Group Profibus ! @Group Profibus
! @Summary Configurates a Profibus PCI master card (Softing profiboard) ! @Summary Configurates a Profibus PCI master card (Softing profiboard)
! Configurates a Profibus PCI master card (Softing Profiboard). Available on LynxOS and Linux. ! Configurates a Profibus PCI master card (Softing Profiboard). Available on LynxOS and Linux.
! The object should be named Px, where x is the number of the device, eg P1. ! The object should be named Px, where x is the number of the device, eg P1.
! You can have maximum two buses (master cards) on each system. ! You can have maximum two buses (master cards) on each system. The latest API from Softing
! can only handle one board per process. So you have to make sure to select PlcThread
! objects from different PlcProcess objects.
!*/ !*/
Object Pb_Profiboard $ClassDef 13 16-JAN-2006 09:46:40.51 Object Pb_Profiboard $ClassDef 13 16-JAN-2006 09:46:40.51
Body SysBody 16-JAN-2006 09:46:40.51 Body SysBody 16-JAN-2006 09:46:40.51
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment