×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 19267653, Entry date: 05/04/2010
(2)
Rate

Tips and tricks for loading and testing S7 programs

  • Entry
  • Associated product(s)

Instructions
This entry includes a number of tips and tricks for loading and testing the S7 programs.

  1. Why are the events of the diagnostics buffer only displayed in HEX format in Windows 2000?
  2. Why is the Download button grayed out in the selected block folder?
  3. How can you monitor the actual values of the OUT variables that have been parameterized with a PQW (peripheral output word)?
  4. How do you restore the "Current value" column in the data view of the data block?
  5. What should you pay attention to with "Upload Station to PG" in conjunction with multi-instances in STEP 7 V5.2 and higher?
  6. What is the significance of the "Node Flashing Test..." function in the SIMATIC Manager in STEP 7 V5.3 and higher?
  7. How do you reactivate a system query, e.g. the query as to whether an existing block is to be overwritten during downloading?
  8. Why can you not set up an online connection with STEP 7 when automatic parameterization of the DP interface is to be set?
  9. How do you set the IP address after commissioning? ("Edit Ethernet Users" dialog only possible for commissioning)

The table below provides information and remedies for the above.
 

No. Tips and tricks for loading and testing the S7 programs
1 Why are the events of the diagnostics buffer only displayed in HEX format in Windows 2000?
Probably the DCOM configuration was modified in MS Windows 2000. This conversion might have been done automatically by third-party software.

Remedy
In MS Windows 2000 you open the "Properties - DCOM configuration" via "Start > Run... > dcomcnfg" and in the "Standard Properties" tab you change the "Default Impersonation Level" entry from "Anonymous" to "Identify". Then you have to restart your computer.


Fig. 01

Note
In MS Windows XP you might also get the error message "Internal OLE error (256:26)". Information on the internal OLE error is available in Entry ID: 10208766.

2 Why is the Download button grayed out in the selected block folder?
This is probably due to the fact that the project is set as a PCS 7 project. Depending on whether a project is used for STEP 7 or for PCS 7, the SIMATIC Manager adapts PCS 7-related functions and menu commands. Only the entire S7 station can be loaded into STEP 7 when the project is configured as a PCS 7 project. In this setting, individual blocks cannot be loaded without the CPU going into Stop mode. The Download button or "PLC > Load" function cannot be activated (grayed out) in the block folder which is selected.

Remedy

  1. Right-click on the project or project name.
  2. Then select "Object properties..." in the pop-up menu that opens.
  3. Go to the "General" tab in the "Properties - Project" dialog and define the setting for use. Change the use of PCS 7 to STEP 7 here.
  4. After clicking OK to save, the Download button or "PLC > Load" function can be activated, and you can load individual blocks into the CPU.
3 How can you monitor the actual values of the OUT variables that have been parameterized with a PQW (peripheral output word)?
The actual values of the OUT variables of FBs and FCs that have been parameterized with a PQW (peripheral output word) cannot be monitored directly. You must store these values beforehand temporarily in flags, flag words or flag double words. Fig. 02 shows an example of how to copy the values from the marker words into the peripheral output words using load and transfer statements. The OUT parameters of the function are not parameterized directly with PQW0 and PQW2, but are stored temporarily in MW10 and MW12. This makes it possible in the LAD/FBD/STL editor to monitor the actual values via "Test > Monitor" or also via "PLC > Monitor/modify variable".


Fig. 02

4 How do you restore the "Current value" column in the data view of the data block?
If the "Current value" column is not visible in the data view for your data block, the column is only hidden. The column becomes visible again by changing the view to a different value, e.g. 200%, via "View > Zoom Factor...". The column then becomes visible again, and you can set the view to the original value. Please also refer to Entry ID: 16719968.
5 What should you pay attention to with "Upload Station to PG" in conjunction with multi-instances in STEP 7 V5.2 and higher?
Structure information (UDTs, instances etc.) is not loaded into the automation system in STEP 7, but just stored in the offline project. If you use "Upload Station to PG" to upload a program with multiple instances from the automation system to the PG, declarations of multi-instances are marked as not consistent and the blocks cannot be modified or stored.

Example
A function block FB2 is called as a multi-instance in an FB1. If the program is uploaded to the PG, then the line with the FB2 is marked red. The FB1 cannot be modified or stored, because the declaration of the FB2 is displayed as inconsistent.

Remedy
In order to have the structure of the multi-instance displayed in the declaration you must store the multi-instance again. You can use the "Check block consistency" function to store all the multi-instances in the project.

6 What is the significance of the "Node Flashing Test..." function in the SIMATIC Manager in STEP 7 V5.3 and higher?
Using the "Node Flashing Test..." function you can determine to which of the various S7 stations connected simultaneously to the bus there is a direct connection. Using the menu command "PLC > Diagnostics/Setting > Node Flashing Test..." you can identify the station connected directly to the PG/PC by the FORCE LED that flashes. The following requirements must be fulfilled:
  • You can only run the node flashing test if you have activated the "PLC > Display accessible nodes" function beforehand in the SIMATIC Manager.
  • The current module that is to be reached must support the "Node Flashing Test".
  • You cannot run the node flashing test if the FORCE function is activated.

In the "Node Flashing Test" dialog you can set the flashing duration from 3 to 60 seconds and start the flashing test. The node that is connected directly is identified by the FORCE LED that flashes.

7 How do you reactivate a system query, e.g. the query as to whether an existing block is to be overwritten during downloading?
When you download an existing block into the CPU, the following message appears before downloading:
  • Downloading (294:103) The block ... already exists. Should it be overwritten?

You can deactivate this query by disabling the checkbox within the message. As a result, this message does not appear again in the future. In order to reactivate this message, go to in the SIMATIC Manager and open the dialog box "Options > Customize... > Tab: General"; click "Activate" under "Deactivated system messages:" . The system messages now appear again every time before existing blocks are downloaded.

8 Why can you not set up an online connection with STEP 7 when automatic parameterization of the DP interface is to be set?
If error message 33:16931 "The bus parameters could not be determined automatically (online)" is issued, then the reason for this error is that no bus parameter message is sent on the PROFIBUS which triggers STEP 7. STEP 7 needs the parameters to go online on the PROFIBUS. On the one hand, you can assign these parameters to STEP 7 manually (specification of a special parameterization when setting the PG/PC interface, e.g. CP5611 PROFIBUS), on the other they are generated by STEP 7 through evaluation of the bus parameter message (automatic parameterization).
Generally, when configuring a PROFIBUS network, the cyclic distribution of the bus parameters is activated automatically as soon as a node on the network supports this function.
If this function is deactivated due to special circumstance (e.g. for optimization of the bus cycle times etc.) or no node on the bus supports this function, then you must set the bus profile manually to be able to go online.
9 How do you set the IP address after commissioning? ("Edit Ethernet Users" dialog is only possible for commissioning)
The "Set IP Configuration" in the "Edit Ethernet Users" dialog is only possible for commissioning. That is to say, only until you first load the system data into the CPU. If you get the message that there is already an IP configuration in the CPU or that the action cannot be performed in the module's current operating mode (message number "4502:956"), then you must change the IP address in the hardware configuration.

Remedy

  1. Change the IP in the Properties of the CPU ("Properties of the Ethernet Interface PN-IO" dialog) in the HW Config.
  2. Save and compile the hardware configuration to update the SDBs.
  3. Then load the hardware configuration into the CPU.

Then, via the "Reset" button you can reset the CPU to the factory settings. If you get the messages described above here too, we recommend the following remedy.

  1. To reset the device names and IP address of the CPU, you first switch over to Online mode (via "Accessible Nodes" or "View > Online").
  2. In the "Online" view you delete the "System Data" folder in the block container.
  3. Execute the menu command "PLC > Diagnostics/Setting > Overall Reset...".

The CPU has now been reset to the factory settings with regard to the IP and device name and now, via the "Edit Ethernet Users" function, you can configure the CPU as you wish until you load new system data.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Rate entry
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.