This library contains function associated with the address config. Functions are provided for getting the current settings, deleting the config and setting the config.
More...
|
| fwPeriphAddress_get (string dpe, bool &configExists, dyn_anytype &config, bool &isActive, dyn_string &exceptionInfo) |
| Get the address config of a datapoint element. More...
|
|
| fwPeriphAddress_getMany (dyn_string &dpes, dyn_bool &configExists, dyn_dyn_anytype &config, dyn_bool &isActive, dyn_string &exceptionInfo) |
| Get the address config of a datapoint element. More...
|
|
| fwPeriphAddress_set (string dpe, dyn_anytype configParameters, dyn_string &exceptionInfo, bool runDriverCheck=FALSE) |
| Set the address config for a given data point element. More...
|
|
| fwPeriphAddress_setMany (dyn_string &dpes, dyn_dyn_anytype &configParameters, dyn_string &exceptionInfo, bool runDriverCheck=FALSE) |
| Sets the address config for a given set of data point elements See fwPeriphAddress_set() for an example. More...
|
|
This library contains function associated with the address config. Functions are provided for getting the current settings, deleting the config and setting the config.
- Creation Date
- 28/03/2000
- Modification History
14/07/2014 Jean-Charles Tournier
- FWCORE-3112 support for IEC configuration to detect active address
09/04/2014 Marco Boccioli
- FWCORE-3157 improve delete performance for DIP: fwPeriphAddress_deleteDIPMultiple() created
31/03/2014 Marco Boccioli
22/11/2013 Marco Boccioli, Alexey Merezhin
- FWCORE-3147 Modify $param for option to avoid configuring periphery address if driver is running
12/11/2013 Marco Boccioli
- FWCORE-3146 Option to avoid configuring periphery address if driver is running: added to fwPeriphAddress_set() the check isDollarDefined() this check is done in order to make UNICOS CPC skip the set of periphery address in case the driver is running.
09/09/2013 Marco Boccioli
- FWCORE-3141 fwPeriphAddress_setOPCUA: single-query mode should not need polling group
18/07/2013 Marco Boccioli
18/02/2013 Jean-Charles Tournier
15/01/2013 Marco Boccioli
12/08/2011 Marco Boccioli
12/08/2011 Marco Boccioli
27/04/2010 Frederic Bernard (EN-ICE) update Exception management in fwPeriphAddress_setModbus()
15/01/2004 Oliver Holme (IT-CO) Modified library to match functionality of other config libs
- Constraints
- WARNING: the functions use the dpGet or dpSetWait, problems may occur when using these functions in a working function called by a PVSS (dpConnect) or in a calling function
- Usage
- Public
- PVSS managers
- VISION, CTRL
- Author
- Geraldine Thomas, Oliver Holme (IT-CO)
fwPeriphAddress_get |
( |
string |
dpe, |
|
|
bool & |
configExists, |
|
|
dyn_anytype & |
config, |
|
|
bool & |
isActive, |
|
|
dyn_string & |
exceptionInfo |
|
) |
| |
Get the address config of a datapoint element.
The function checks that the relevant driver is running. If not it returns an exception saying the config could not be read.
- Examples
- get the address of a dpe
string dpe = "system1:datapoint1.value";
bool configExists, isActive;
dyn_anytype config;
dyn_string exceptionInfo;
DebugN("fwPeriphAddress_get:\n ", dpe, configExists,
config, isActive, exceptionInfo);
- Constraints
- Currently only supports MODBUS, OPCCLIENT, OPC UA, DIP and DIMCLIENT address types
- Usage
- Public
- PVSS managers
- VISION, CTRL
- Parameters
-
dpe | datapoint element to read from |
configExists | TRUE if address config exists, else FALSE |
config | Address object is returned here (configParameters). See description for configParameters on fwPeriphAddress_set() |
isActive | TRUE is address config is active, else FALSE |
exceptionInfo | details of any errors are returned here |
Referenced by _fwPeriphAddressCMW_initPanel(), and _fwPeriphAddressS7_initPanel().
fwPeriphAddress_getMany |
( |
dyn_string & |
dpes, |
|
|
dyn_bool & |
configExists, |
|
|
dyn_dyn_anytype & |
config, |
|
|
dyn_bool & |
isActive, |
|
|
dyn_string & |
exceptionInfo |
|
) |
| |
Get the address config of a datapoint element.
The function checks that the relevant driver is running. If not it returns an exception saying the config could not be read.
- Constraints
- Currently only supports MODBUS, OPCCLIENT, DIP and DIMCLIENT address types
- Usage
- Public
- PVSS managers
- VISION, CTRL
- See also
- fwPeriphAddress_get()
- Parameters
-
dpes | datapoint element to read from. Passed as reference for performance reasons. Not modified. |
configExists | TRUE if address config exists, else FALSE |
config | address object is returned here. See fwPeriphAddress_get() for details on the addess object. |
isActive | TRUE is address config is active, else FALSE |
exceptionInfo | details of any errors are returned here |
fwPeriphAddress_set |
( |
string |
dpe, |
|
|
dyn_anytype |
configParameters, |
|
|
dyn_string & |
exceptionInfo, |
|
|
bool |
runDriverCheck = FALSE |
|
) |
| |
Set the address config for a given data point element.
- Constraints
- Currently supports S7, MODBUS, OPCCLIENT, OPC UA, DIP and DIMCLIENT address types
- Examples
Example: S7.
It connects the dpe sys_1:testPerAddr.input to the element DB81.DBD0F. The PLC connection is defined on Test_PLC.
dyn_anytype params;
dyn_string exc;
params[fwPeriphAddress_TYPE] = fwPeriphAddress_TYPE_S7;
params[fwPeriphAddress_DRIVER_NUMBER] = 2;
params[fwPeriphAddress_DIRECTION] = DPATTR_ADDR_MODE_INPUT_POLL;
params[fwPeriphAddress_DATATYPE] = 700;
params[fwPeriphAddress_ACTIVE] = true;
params[fwPeriphAddress_S7_LOWLEVEL] = false;
params[fwPeriphAddress_S7_POLL_GROUP] = "_poll_PLC_Test";
Example: OPC UA.
It connects the dpe sys_1:testPerAddr.input to the element OPCUAConnection1$subscription2$1$1$item1. The OPC UA Client connection is defined on OPCUAConnection1.
dyn_anytype params;
dyn_string exc;
params[fwPeriphAddress_TYPE]=fwPeriphAddress_TYPE_OPCUACLIENT;
params[fwPeriphAddress_DRIVER_NUMBER]=6;
params[fwPeriphAddress_DIRECTION]=DPATTR_ADDR_MODE_INPUT_SPONT;
params[fwPeriphAddress_DATATYPE]=750;
params[fwPeriphAddress_ACTIVE]=true;
- Usage
- Public
- PVSS managers
- VISION, CTRL
- Parameters
-
dpe | datapoint element to act on |
configParameters | Address object is passed here:
- configParameters[fwPeriphAddress_TYPE] contains type of addressing:
– fwPeriphAddress_TYPE_OPCCLIENT
– fwPeriphAddress_TYPE_OPCUACLIENT
– fwPeriphAddress_TYPE_DIMCLIENT
– fwPeriphAddress_TYPE_DIP
– fwPeriphAddress_TYPE_MODBUS
– fwPeriphAddress_TYPE_S7
– fwPeriphAddress_TYPE_CMW
- configParameters[fwPeriphAddress_DRIVER_NUMBER] contains driver number
- configParameters[fwPeriphAddress_ROOT_NAME] contains address string
- configParameters[fwPeriphAddress_DIRECTION] contains direction of address for dpe:
– DPATTR_ADDR_MODE_OUTPUT_SINGLE
– DPATTR_ADDR_MODE_INPUT_SPONT
– 6 for in/out (no PVSS constant available yet)
- configParameters[fwPeriphAddress_DATATYPE] contains the translation datatype
- configParameters[fwPeriphAddress_ACTIVE] contains whether or not the address is active
Note: This active parameter is ignored if using DIM (always active)
- MODBUS Specific entries in address object:
– configParameters[fwPeriphAddress_MODBUS_LOWLEVEL]
– configParameters[fwPeriphAddress_MODBUS_SUBINDEX]
– configParameters[fwPeriphAddress_MODBUS_START]
– configParameters[fwPeriphAddress_MODBUS_INTERVAL]
- OPC Specific entries in address object:
– configParameters[fwPeriphAddress_OPC_LOWLEVEL] contains is lowlevel comparison is enabled (output only)
– configParameters[fwPeriphAddress_OPC_SUBINDEX] contains subindex if datatype = 'bitstring'
– configParameters[fwPeriphAddress_OPC_SERVER_NAME] contains OPC server name
– configParameters[fwPeriphAddress_OPC_GROUP_IN] contains OPC group for input address configs only
– configParameters[fwPeriphAddress_OPC_GROUP_OUT] contains OPC group for output address configs only
- OPC UA Specific entries in address object:
– configParameters[fwPeriphAddress_OPCUA_LOWLEVEL] contains is lowlevel comparison is enabled (output only)
– configParameters[fwPeriphAddress_OPCUA_SERVER_NAME] contains OPC server name
– configParameters[fwPeriphAddress_OPCUA_SUBSCRIPTION] contains OPC UA subscription name
– configParameters[fwPeriphAddress_OPCUA_KIND] contains OPC UA kind
– configParameters[fwPeriphAddress_OPCUA_VARIANT] contains OPC UA variant
– configParameters[fwPeriphAddress_OPCUA_POLL_GROUP] contains polling group name (including system name). Compulsory in case no subscription is specified
- DIM Client Service Specific entries in address object:
– configParameters[fwPeriphAddress_DIM_CONFIG_DP] the DIM config data point to which the config is saved
– configParameters[fwPeriphAddress_DIM_DEFAULT_VALUE] default value setting
– configParameters[fwPeriphAddress_DIM_TIMEOUT] timeout setting
– configParameters[fwPeriphAddress_DIM_FLAG] flag setting
– configParameters[fwPeriphAddress_DIM_IMMEDIATE_UPDATE] immediate update setting
- DIP Client Specific entries in address object:
– configParameters[fwPeriphAddress_DIP_CONFIG_DP] the DIP config data point to which the config is saved
- S7 Specific entries in address object:
– configParameters[fwPeriphAddress_S7_LOWLEVEL]
– configParameters[fwPeriphAddress_S7_SUBINDEX]
– configParameters[fwPeriphAddress_S7_START]
– configParameters[fwPeriphAddress_S7_INTERVAL]
– configParameters[fwPeriphAddress_S7_POLL_GROUP]
|
exceptionInfo | details of any errors are returned here |
runDriverCheck | Optional parameter (default value = FALSE) - TRUE to check if driver is running before setting config, else FALSE The necessary driver number must be running in order to successfully create config |
fwPeriphAddress_setMany |
( |
dyn_string & |
dpes, |
|
|
dyn_dyn_anytype & |
configParameters, |
|
|
dyn_string & |
exceptionInfo, |
|
|
bool |
runDriverCheck = FALSE |
|
) |
| |
Sets the address config for a given set of data point elements See fwPeriphAddress_set() for an example.
- See also
- fwPeriphAddress_set()
- Parameters
-
dpes | list of datapoint elements to act on |
configParameters | Address objects are passed here, one per dpe. See fwPeriphAddress_set() for details. |
exceptionInfo | details of any errors are returned here |
runDriverCheck | Optional parameter (default value = FALSE) - TRUE to check if driver is running before setting config, else FALSE The necessary driver number must be running in order to successfully create config |