Call Parameters and Switches

Overview

You can start the Diagnostics by writing a series of call parameters into a batch file and executing it via the Windows Run... command in the Start menu. Some of these call parameters execute program functionalities.

NOTE: If the commands are called up via a batch file, then the processing takes place synchronously. However, by a call via a console, the processing takes place asynchronously. To be able to perform synchronous processing via a console, set the prefix start /b /wait before the command.

Example:

start / b/ wait Diagnostics.exe 
-save ip etcp3://10.128.225.156 

Credentials

The credentials are required to access the controller. The corresponding switches are used as required by the system. For example, if no renewal password is needed in an attempt to connect to a controller, the corresponding switch -renewalpassword is ignored.

Available switches:

  • -username: Name of the user requesting access

  • -password: Password of the user requesting access

  • -renewalpassword: Password used when a new password is requested (initial connection or after a reset of the device user rights on the controller

NOTE: If you start the Diagnostics with the GUI (Graphical User Interface), you can also set the three arguments - username, -password, and -renewalpassword. In this case, you are not prompted to enter credentials. The credentials are retrieved from the values of the arguments.

The use of the switches depends on the version of EcoStruxure Machine Expert.

EcoStruxure Machine Expert < 2.0

For the initial connection to a controller and after a reset of the device user rights on the controller, the following settings are required:

  • -username: Administrator

  • -password: Administrator

  • -renewalpassword: MyNewPassword (MyNewPassword corresponds to the new password to use)

Example initial access EcoStruxure Machine Expert < 2.0

-username Administrator -password Administrator -renewalpassword MyNewPassword -connect ip etcp4://10.128.154.217

Example subsequent access EcoStruxure Machine Expert < 2.0

For subsequent access, -username is still “Administrator“, while -password is the new password.

-username Administrator -password MyNewPassword -renewalpassword MyNewPassword -connect ip etcp4://10.128.154.217

EcoStruxure Machine Expert 2.0 and later

For the initial connection to a controller and after a reset of the device user rights on the controller, the following settings are required:

  • -username: MyNewUserName (is the new user name you want to use)

  • -password: MyNewPassword (is the new password to use)

  • -renewalpassword: MyNewPassword (is the new password to use)

Example subsequent access EcoStruxure Machine Expert 2.0 and later

-username MyNewUserName -password MyNewPassword -renewalpassword MyNewPassword -connect ip etcp4://10.128.154.217

Managing Certificates

If a connection to a controller is established and the certificate of the controller is not yet available, this optional call parameter switch allows you to decide how to proceed:

  • promptuser (default setting): A user prompt is displayed allowing you to decide how to proceed with the detected certificate.

  • donottrust: The certificate is declared as untrusted and the connection is unsuccessful if requested.

  • trustonce: The certificate is declared as trusted for this communication attempt but not saved on this PC to the folder Controllers of the Windows User certificates.

  • trustalways: The certificate is declared as trusted and saved on this PC to the folder Controllers of the Windows User certificates.

Usage:

[-untrustedServerCertificateValidationMode <promptuser|donottrust|trustonce|trustalways>]

Example:

Diagnostics.exe -encryptedcommunication auto -untrustedServerCertificateValidationMode trustonce -username MyUser -password MyPassword -connect ip etcp4://190.201.100.100

Additionally, expired server certificates can be accepted or declined:

  • promptuser (default setting): A user prompt is displayed allowing you to decide how to proceed with the expired server certificate.

  • false: An expired server certificate is declared as untrusted and the connection is unsuccessful if requested.

  • true: An expired server certificate is declared as trusted.

Usage:

[-AcceptExpiredServerCertificates  <promptuser|false|true>]

Example:

Diagnostics.exe -username MyUserName -password MyUserNamePassword -renewalpassword MyFirstUserPassword -untrustedservercertificatevalidationmode trustonce -AcceptExpiredServerCertificates true –connect ip etcp4://192.168.2.50:11740

Setting Encryption Mode

This optional call parameter switch can be used to set the encryption mode while connecting to a controller:

  • no: No encryption is used.

  • tls: TLS encryption is used.

  • auto (default setting): The most secured mode supported by the controller is used.

Usage:

[-encryptedcommunication <no|tls|auto>]

Example:

Diagnostics.exe -encryptedcommunication auto -untrustedServerCertificateValidationMode trustonce -username MyUser -password MyPassword -connect ip etcp4://190.201.100.100

Additional Call Parameters and Call Parameter Switches

The following table provides an overview of the individual call parameters and call parameter switches:

Call Parameter

Description

-connect ip <IP-/EPATH-Address>

Starts the program and immediately collects the data of the controller selected under <IP-/EPATH-Address>.

Equivalent to collecting data via Ethernet in the window Connect to controller via....

-connect com <ComPort>

Starts the program and immediately collects the data of a controller connected to a COM port. The port is selected using <ComPort>.

Equivalent to collecting data via Com (RS 232) in the window Connect to controller via....

-connect modem

Starts the program and immediately collects the data of a controller connected via modem.

Equivalent to collecting data via Modem in the window Connect to controller via....

NOTE: The dial-up connection must already be established.

-open <file name>

Starts Diagnostics and immediately opens the data collection from the file entered under <file name>. Equivalent to Open... command on the Home window.

-nosplash

Suppresses the Home window that is normally shown upon startup.

-language <language abbreviation>

Starts the program in the language entered under <language abbreviation>.

Possible language abbreviations are:

  • de: German

  • en: English

  • fr: French

  • it: Italian

  • es: Spanish

  • pt: Portuguese

  • tr: Turkish

  • ch: Chinese

  • ja: Japanese

-userconfigfile <file name>

V1.6 and later.

Loads the configuration file specified under <filename> with user-specific settings (for example, automatic name generation when saving the data collection).

-help

V2.0 and later.

Prints all possible call parameters and examples to the console.

Example: Diagnostics.exe -help

-save ip <IP-/EPATH-Address> file <file name>

-save modem file <file name>

-save com <ComPort> file <file name>

V2.0 and later.

Collects the data from the controller and saves it directly under the file name. The call-up is effected via the command line, that is, without a graphical user interface.

NOTE: You need write access rights to the given file destination. If you do not have write access rights, you can try to start Diagnostics with administrative privileges.

You can enter the call parameters in different orders. In some cases, you can combine them (not –connect). This is case-sensitive. If you enter invalid parameters, the program will not start. When this happens, no diagnostic message is displayed.

Examples of Simple Calls

  • Diagnostics.exe -connect ip 10.205.0.50

  • Diagnostics.exe -connect ip epath3://9078.0AE8@10.128.224.120:1217

  • Diagnostics.exe –connect ip etcp2://192.168.2.50

  • Diagnostics.exe –connect ip enodename3://LMC_PacDrive (192.168.2.50)

  • Diagnostics.exe –connect ip enodename3://173.20.5.36:1105,LMC_PacDrive (192.168.2.50)

  • Diagnostics.exe –connect ip enodename3://[10.128.154.12:1217],LMC_PacDrive (192.168.2.50)

  • Diagnostics.exe –connect ip enodename3://[10.128.154.12:1217],LMC_PacDrive (192.168.2.50)

  • Diagnostics.exe –connect ip etcp3://192.168.2.50

  • Diagnostics.exe –connect ip etcp3://173.20.5.36:1105,192.168.2.50

  • Diagnostics.exe –connect ip etcp3://[10.128.154.12:1217],192.168.2.50

  • Diagnostics.exe –connect ip etcp4://192.168.2.50:11740

  • Diagnostics.exe -connect com 1

    (PacDrive M only)

  • Diagnostics.exe -connect modem

    (PacDrive M only)

  • Diagnostics.exe -open "c:\Documents and Settings\C200.pdi"

  • Diagnostics.exe –nosplash

  • Diagnostics.exe -userconfigfile "c:\Documents and Settings\MyConfiguration.xml"

  • Diagnostics.exe -save ip 10.205.0.50 file „c:\Users\MyUser\Documents\Machinexyz.pdi"

  • Diagnostics.exe -save com 1 file „c:\Users\MyUser\Documents\Machinexyz.pdi"

    (PacDrive M only)

  • Diagnostics.exe -save ip etcp2://10.205.0.50 file "c:\Users\MyUser\Documents\Machinexyz.pdi"

    (PacDrive M only)

  • Diagnostics.exe -save ip etcp3://10.205.0.50 file "c:\Users\MyUser\Documents\Machinexyz.pdi"

    (PacDrive 3 only)

Examples of Combined Calls

  • Diagnostics.exe -connect ip 10.205.0.50 –nosplash

  • Diagnostics.exe -connect ip epath3://9078.0AE8@10.128.224.120:1217 –nosplash–language de

  • Diagnostics.exe –language de -open "c:\Documents and Settings\C200.pdi"

  • Diagnostics.exe -userconfigfile "c:\Documents and Settings\MyConfiguration.xml" -nosplash

  • Diagnostics.exe -username Administrator -password Administrator -renewalpassword MyNewPassword –connect ip etcp4://192.168.2.50:11740

  • Diagnostics.exe -username Administrator -password MyPassword –connect ip etcp3://192.168.2.50

  • Diagnostics.exe -username Administrator -password MyPassword –save ip enodename3://TM262@MyMacAddress file "c:\Temp\MyMachine.pdi"

  • Diagnostics.exe -encryptedcommunication auto -untrustedServerCertificateValidationMode trustonce -username MyUser -password MyPassword –save ip etcp4://192.168.2.50 "c:\Users\MyUser\Documents\Machinexyz.pdi"