This section describes the steps to adjust CNCnetPDM via it's INI file according to your needs.
CNCnetPDM.ini contains all information needed to control the functions of the service and to find and configure devices connected and controlled by the service. Although it is save and possible to start CNCnetPDM without any modifications to this file it is recommended to know the parameters and adjust them according to your needs. CNCnetPDM.ini contains the following sections:
This section contains global parameters used by CNCnetPDM.
License = Your license number Automatically created when you start CNCnetPDM the first time. Initially this is a demo license for an unlimited number of devices. With this license type device drivers other than device.dll output a restricted number of configured items. See section LICENSING for more details.
ServiceID = 1 - Possible values 1 - 9 If a device sends more than one item to CNCnetPDM in a reading cycle (for example Status, Counter, Work-Order, Quality and Process data) these records get the same Group_ID that enables to keep those records together. If you run more than one instance of the service on the same PC you can define a unique ServiceID for every instance so that Group_ID is always unique. If you just run one instance of the service there’s no need to change ServiceID.
IncrementCounters = 0 0 = Send part counter values unmodified as shown at the controller (actual value may be lower than previous value) 1 = Send part counter values and compensate resets at the controller (cumulative mode) 2 = Send difference between the previously and actually received part counter value (incremental mode), takes into account part counter resets also
LimitCounters = 0 Optional, not automatically created. Only active when IncrementCounters is set to 2. Limit the possible amount of produced parts between previous and actual reading cycle. Default 0 = no limit.
ReplaceCounters = 20 Optional, not automatically created. Only active when IncrementCounters is set to 2 and LimitCounters not 0. If above the limit replace part counter value with this value.
UseDNS = 1 1 = Identify devices by their DNS Hostname 0 = Use IP-Address of the device If you can reach your devices by sending command ping DNSHOSTNAME (e.g. FANUC1) you can set the value to 1, otherwise 0 (default) should be used.
AcquisitionMethod = 1 Method that should be used for data acquisition 1 = solicited (time controlled) 2 = unsolicited (event driven) messaging. When solicited messaging is used the device is queried for data in specified intervals (PollInterval) by the service, otherwise the device actively has to send data to the service. Please set this value to 1 if you do not use a device driver that is able to actively send data.
PollInterval = 5 Interval (seconds) for reading data from devices if solicited messaging is used (default 5). The lowest possible value is 1. Please note that short values may produce a large amount of data if you store all acquired data, initially it's a good idea to start with values like 5 or 10. In case of unsolicited messaging this entry enables you to set the interval in seconds for checking if the device is switched on and accessible (alive).
ReconnectAfter = 10 This setting defines the behaviour of CNCnetPDM in case there's a network connection problem, your device goes down or is switched off. Solicited messaging: CNCnetPDM tries to reconnect to your device after this number of unsuccessful reading attempts. Unsolicited messaging: CNCnetPDM tries to reconnect to your device after this number of successful device switched on (alive) checks. Do not set this entry to low values e.g. 2 for devices that need some time to completely start up!
If your poll interval is 5 seconds and this value is set to 10 CNCnetPDM tries to reconnect to your device once every 50 seconds. In case you use low polling intervals it's recommended to use higher values for ReconnectAfter for example at least 10 if PollInterval = 1. Otherwise CNCnetPDM creates a high number of logfile entries.
CollectStates = 1 Output OEE machine states (0 switched off, switched on (half-alive) 1, producing 2, manual 3, interrupted 4, error 5) from your devices. Can be 1 or 0. Usually leave this value at 1.
CollectCounters = 1 Output numeric part counter values either unmodified, cumulative or incremental. Set this value to 1 if your device provides output of part counter values.
CollectOrders = 1 Entry naming due to historical reasons. Device drivers can send data to different sections, comparable to data groups. Defines if data received from section 1 of your device drivers should be output (Prefix = O).
CollectQuality = 1 Naming of this entry is also due to historical reasons. Defines if data received from section 2 of your device drivers should be output (Prefix = A).
CollectFeeder = 1 Entry naming also due to historical reasons. Defines if data received from section 3 of your device drivers should be output (Prefix = F).
CollecMessages = 0 Defines if the device name as set in section [RS232] should be output (Prefix = M). Tag name can be set by parameter 'Message' in section [ERP], default COMP_MSG.
The 6 entries above define what should be output, value can either be 0 (no acquisition) or 1. Device Status and Counters are numeric values, all other items are alphanumeric.
Section [RS232]
This section (naming due to historic reasons) contains information about devices connected to CNCnetPDM.
For every device one line with a sequential label (number or character) + ‘=’ and exactly 16 items is used. Of course it would have been possible to create an own section or .ini file for every connected device however, the benefits of this technique are that you just have to copy one line and adjust the parameters needed to add a new device and the size of the INI file still stays small, even with 54 devices. All items have to be separated by semicolons ‘;’.
Note: In case there’s an error in a device configuration line CNCnetPDM continues to work but automatically uses save default values which may not point to the desired device!
ITEM
DESCRIPTION
Label =
Use a unique sequential number or character per line
Device Nr.
Device number 4-digits, use a unique number for every device
Baud
Obsolete, leave at 19200
Data-bits
Obsolete, leave at 8
Parity
Obsolete, leave at N
Stop-bits
Obsolete, leave at 1
Device name
Name of the device, use an own name for every device
IP-Address
IP-Address (IPV4) of device, enter 127.0.0.1 if server and device are on the same PC (e.g. Fanuc HSSB, Sinumerik DDE)
Port
TCP port for querying data from device (e.g. Fanuc = 8193, Heidenhain = 19000)
Method
If device.dll provides multiple methods to query data enter it here, otherwise use 0
DNS-Name
DNS Hostname of device, use ‘none’ if devices are found by IP-Address
Machine API Nr.
Number of device specified by manufacturer specific device.dll (e.g. Mitsubishi), otherwise enter 0
PLC addr.
Fanuc only: PLC address of part counter value if the Programmable Logic Controller (PLC) of the device is queried (default 0)
Log-file share
Log-file service only, name of the shared folder at the device (default none)
Log-file name
Log-file service only, name of the log file at the device (default none)
Log-file version
Enables to switch between different versions of a device driver if more than one (default 0)
DLL name
Name of the device driver to be used to query the device (default device.dll)
Initially CNCnetPDM automatically defines one device with the following settings:
The sequential number of the device is 1, device number is 1000, the next 4 items are not used (default values), name of the device is ‘TEST #1’, IP-Address of the device is 127.0.0.1 (same IP-Address as the PC with the service), port and method are not used (0), DNS Hostname is localhost (DNS Hostname of the PC with the service), manufacturer device number and PLC address are not used (both 0), log-file share and name are not used (both ‘none’), log-file version is not used (set to 0), device driver used by the device is device.dll (default).
To add a secondary device on PC with IP-Address 192.168.1.10 and DNS-Hostname ‘PC2’ you could copy the line and modify its content as follows:
Now CNCnetPDM would try to contact PC2 via its DNS-Hostname (if UseDNS is set to 1) or its IP-Address and report random values for the defined items if the device can be reached, otherwise CNCnetPDM would just report state (0) = disconnected.
Section [Protokoll]
This section - German for protocol - defines the depth and date format of writing log-files
LEVEL = 0 Logs only errors and startup messages, depth can be controlled via GUI, leave at 0.
MODUS = 12 Format of date extension appended to log files (e.g. log_db_161006.txt = YYMMDD), leave at 12.
Section [OPC UA Server]
This section enables you to control the behaviour of CNCnetPDM's OPC UA Server.
IP Address = 0 If set to 0 the OPC UA Server creates endpoints with the DNS Hostname of the PC it runs on. To access the OPC UA Server from clients outside of your local network that cannot resolve the PC's DNS Hostname you have to enter the PC's IP Address (IPV4) here.
Port = 4840 Defines the TCP Port the OPC UA Server should listen on, default = 4840 (OPC UA Standard). Important: If you run multiple instances of CNCnetPDM on a single PC you mandatorily have to use a different port for every additional instance, e.g. 4841 otherwise only the first OPC UA Server will work! Please also make sure that you allow bidirectional communication through this port in case you use a firewall.
AnonymousAccess = 0 Allow anonymous access to the OPC UA Server, 0=no, 1=yes, default = 0.
ReconnectAfter = 10 Defines the interval (seconds) CNCnetPDM should use to try to restart the OPC UA Server in case it goes down.
StartOffline = 1 If set to 1 CNCnetPDM does not automatically start the OPC UA Server, default = 1.
NumberOfUsers = 1 Number of OPC UA usernames and passwords, min = 1, max = 10, default=1. Defines the number of usernames and passwords for the OPC UA Server. If no section [OPC UA User n] exists the default username and password for every user is 'OpcUaClient'.
Section [OPC UA User 1]
Username = OpcUaClient Password = OpcUaClient
Defines the username and password for the first user of the OPC UA Server, default 'OpcUaClient'. For additional users increase 'NumberOfUsers' in section [OPC UA Server], copy and paste the whole section and increase the number in the section name by 1, e.g. [OPC UA User 2]. Up to 10 users can be defined.
Section [MTC Adapter]
This section enables you to control various features of CNCnetPDM's MTConnect Adapter.
IP Address = 0 Defines which IP Address (IPV4) the MTConnect Adapter should listen on. 0 = All IPs (default). If your PC has multiple NICs / IP Addresses and you want the Adapter to just listen on a single IP you can enter it here, e.g. 192.168.0.100
Port = 7878 Defines the TCP Port the MTConnect Adapter should listen on, default = 7878 (MTConnect Standard). Important: If you run multiple instances of CNCnetPDM on a single PC you mandatorily have to use a different port for every additional instance, e.g. 7879 otherwise only the first MTConnect Adapter will work! Please also make sure that you allow bidirectional communication through this port in case you use a firewall.
ReconnectAfter = 30 Defines the interval (seconds) CNCnetPDM should use to try to restart the MTConnect Adapter in case it goes down
StartOffline = 1 If set to 1 CNCnetPDM does not automatically start the MTConnect Adapter, default = 1
Heartbeat = 10000 Heartbeat (milliseconds) to be sent from the CNCnetPDM MTC Adapter to MTC Agents, default = 10000
UTCTime = 0 Output data in UTC (GMT) time = 1 or local time = 0, default = 0
Availability tag code = avail Tag code for device availability, default = avail. For device drivers that do not output a tag code|value pair for availability e.g. Heidenhain the MTConnect Adapter creates it based on the numeric device state. State 0 or 1 lead to avail|UNAVAILABLE, 2 to 5 to avail|AVAILABLE. CollectStates in section [GENERAL] has to be set to 1.
Section [Connect]
This section contains information about the database used by CNCnetPDM
UDL_DATEI = Path and name of an Universal Data Link (UDL) file, default connect.udl. Automatically created when CNCnetPDM starts the first time. Points to the path and name of an UDL file that may contain information about your database connection. You can create different UDL files with different names for different databases, see Database Connectivity for details. Please make sure that only one of them is active at a time. Inactive UDL files can be commented out by a prefixed semicolon ‘;’.
DB_TYPE = 1 Type of Database to be used 1 = SQL Server (default), 2 = ORACLE, 3 = MySQL or MariaDB
ReconnectAfter = 30 Try to reconnect to database after this number of seconds if database goes down. Value depends on how long the usual downtime for your database is.
StartOffline = 1 If set to 1 (default) CNCnetPDM does not try to establish a database connection on startup. Please set this entry to 0 if you have configured and use a database for CNCnetPDM.
WriteRawData = 1 Determines if data should be written to database table RawDataTable (default MTH_RAW_DATA). This table stores all data acquired from your devices in every reading cycle. If enabled it is recommended to further process the data from table RawDataTable (default MTH_RAW_DATA) in regular intervals followed by removing the processed records from this table.
WriteOnlineData = 0 If this entry is set to 1 (enabled) CNCnetPDM writes only the most recent data acquired from your equipment to table OnlineDataTable (default MTH_ONLINE_DATA) and updates all previous records for the specific device. Using this database is very useful if you just like to monitor the actual state of your devices. Of course it also can be used together with writing data to table RawDataTable (default MTH_RAW_DATA).
RawDataTable = MTH_RAW_DATA Name of the database table that stores all data acquired from your devices, default MTH_RAW_DATA
OnlineDataTable = MTH_ONLINE_DATA Name of the database table that stores the most recent data from your devices, default MTH_ONLINE_DATA
ShiftDataTable = MTH_EQP_SHIFT_AVAIL_V Name of the database table (or view) that is used to determine shift availability of your devices, default MTH_EQP_SHIFT_AVAIL_V
OrderDataTable = MTH_USER_CONTEXT Name of the database table used for reading current work order data (order, operation and item) for your devices, default MTH_USER_CONTEXT
Section [Offline]
This section contains information about writing data to a text-file that can be processed afterwards in case your database goes down.
FILENAME = Path + name of offline-text-file Automatically created when CNCnetPDM starts the first time. This entry points to the folder and file name that should be used for offline-text-files. You can change that according to your needs. Please make sure that you always specify folder + file name in this case.
TIMEOUT = 50 Interval (ms) between reading lines of offline files during processing. Minimum and default = 50.
NR = 0 Number appended to the offline text-file. The number is increased by 1 for every new offline text-file written. Initially 0.
SIZE = 0 Initially set to 0, no offline files are created. If not 0 this entry defines the maximum size of offline files in MB. If this limit is reached CNCnetPDM creates a new offline file. Leave at 0 if no database is used.
Section [ERP]
This section contains information about when, what and how to output data to a Database, MTConnect Adapter and/or OPC UA Server.
Changeddataonly = 0 Database only: If this entry is set to 0 (default) all item values are output on every reading cycle. If set to 1 all items values are output on the first reading cycle, subsequent readings only output item values that have changed since last reading. If you are only using table OnlineDataTable (default MTH_ONLINE_DATA) it is a good idea to leave this value at 0 to see the most recent records of all items from a specific device.
CollectInShift = 0 If set to 1 device-data is only collected within an active shift for the device, Database: Requires table ShiftDataTable (default MTH_EQP_SHIFT_AVAIL_V), see chapters SQL Server, Oracle or MySQL MariaDB for details. MTConnect: You can set an active shift state for every device via your application or any MTConnect compliant program. For details see: MTConnect Shifts.
Writeworkorder = 0 If set to 1 current work order, operation and part number for every device are written to the selected database output tables, MTConnect Adapter and/or OPC UA Server. Database: These values are read from table OrderDataTable (default MTH_USER_CONTEXT) and written to the selected output tables, see chapters SQL Server, Oracle or MySQL MariaDB for details. MTConnect: You can 'tag' every device with current work-order, part number and/or item via your application or any MTConnect compliant program. For details see: MTConnect Work Orders.
Writedowntime = 1 If set to 1 CNCnetPDM creates an additional record with the OEE reason for the downtime of a device. In case the status of the device is different to 2 (running) the following reasons are written by CNCnetPDM: Switched off: PWD Powered on but no data can be queried (half-alive-state): PWU Device in manual mode: MAN Automatic operation interrupted: INT Faulted: ERR
Event = STATUS Tag name for OEE device status
Counter = COMP_QTY Tag name for part counter values
Quality = COMP_QLT Tag name for quality related messages from device
Message = COMP_MSG Tag name for device name and messages from device
Order = ORDER Operation = OPERATION Item = ITEM_A Tag names for current work order, operation/sequence and part number (used if Writeworkorder=1)
Feeder = FEED_QTY Tag name for feeder messages
DownTimeReason = DOWN Tag name for OEE downtime reasons (output if Writedowntime=1)
Section [Hochwasser]
This section (German for high water) - contains information about when to switch to error mode.
VERBUCHUNG = 80 (Processing) If more than this number of messages is waiting to be written to one of the components of CNCnetPDM (e.g. the database) CNCnetPDM switches to error mode and writes all data to the offline-text-file. On lower deviation of this value CNCnetPDM automatically switches back to online processing. This is very useful if a database occasionally slows down due to high traffic. Possible values 50 - 200, default 80.
DEVICEINPUT = 10 Enables you to control the maximum number of concurrent messages from a device that may wait to be processed by the main service. If this number is exceeded data from the device is discarded until the next reading cycle. Possible values 10 - 100, default 10.
Privacy notice
This website uses cookies. By continuing to use it you agree to our privacy policy.