fwConfigs  8.4.3
fwPeripheryAddress

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...

Basic Functions

 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, bool setWait=TRUE)
 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, bool setWait=TRUE)
 Sets the address config for a given set of data point elements See fwPeriphAddress_set() for an example. More...
 

Detailed Description

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

09/04/2014 Marco Boccioli

31/03/2014 Marco Boccioli

22/11/2013 Marco Boccioli, Alexey Merezhin

12/11/2013 Marco Boccioli

09/09/2013 Marco Boccioli

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)

Function Documentation

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
Constraints
Currently only supports MODBUS, OPCCLIENT, OPC UA, DIP and DIMCLIENT address types
Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpedatapoint element to read from
configExistsTRUE if address config exists, else FALSE
configAddress object is returned here (configParameters). See description for configParameters on fwPeriphAddress_set()
isActiveTRUE is address config is active, else FALSE
exceptionInfodetails of any errors are returned here
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
dpesdatapoint element to read from. Passed as reference for performance reasons. Not modified.
configExistsTRUE if address config exists, else FALSE
configaddress object is returned here. See fwPeriphAddress_get() for details on the addess object.
isActiveTRUE is address config is active, else FALSE
exceptionInfodetails of any errors are returned here
fwPeriphAddress_set ( string  dpe,
dyn_anytype  configParameters,
dyn_string &  exceptionInfo,
bool  runDriverCheck = FALSE,
bool  setWait = TRUE 
)

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.

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.

Usage
Public
PVSS managers
VISION, CTRL
Parameters
dpedatapoint element to act on
configParametersAddress 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]
    – configParameters[fwPeriphAddress_POLL_GROUP]

  • 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]
exceptionInfodetails of any errors are returned here
runDriverCheckOptional 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
setWaitdetermines if dpSetWait or dpSet should be used
fwPeriphAddress_setMany ( dyn_string &  dpes,
dyn_dyn_anytype &  configParameters,
dyn_string &  exceptionInfo,
bool  runDriverCheck = FALSE,
bool  setWait = TRUE 
)

Sets the address config for a given set of data point elements See fwPeriphAddress_set() for an example.

See Also
fwPeriphAddress_set()
Parameters
dpeslist of datapoint elements to act on
configParametersAddress objects are passed here, one per dpe. See fwPeriphAddress_set() for details.
exceptionInfodetails of any errors are returned here
runDriverCheckOptional 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