Kkula
Browse Questions » STEP 7 / STEP 7 Lite: Initial Parameter From Data block not loaded

About User

Questions Asked: 37.9K

Answers Given: 32

0
  • Open

STEP 7 / STEP 7 Lite: Initial Parameter From Data block not loaded

Hello, 
I'm working with step 7 v5.5 sp4 and PLCSIM for simulation.
I created a DB and I define the first word with value 20 as initial value. 
My problem was when I load my program (using PLCSIM)and go online, I find that the first word of DB was 0 (as you see in attachement) and this value don't change until I force it using VAT.
So, why I can't see initial value (20) after loading DB?

0 Likes 0 Favourites 0 Followers 0 Comments
Answers(131)

Simotion Package & Hardware Detection Issue in STEP V5.6

It appears you're encountering a common issue with STEP V5.6 after installing newer software like Simotion Starter and SSP for S120 drives. Here's a breakdown of the problem and solutions:

Problem Analysis

STEP V5.6 has specific dependencies on the Simotion package. Installing newer Simotion Starter often doesn't automatically integrate correctly with the older STEP V5.6. This results in the "Simotion package not installed" error and the CPU 320PN not appearing in the hardware catalog.

Solutions

  1. Simotion Package Installation: Ensure the correct Simotion package version (compatible with STEP V5.6) is explicitly installed. Do not rely on Starter installation to handle this. You may need to manually install it from your Simotion installation media or download it from Siemens Support Portal.
  2. Hardware Catalog Update: After installing the Simotion package, navigate to Options > Catalogs in Simatic Manager. Make sure the Simotion catalog is checked/activated.
  3. Restart Simatic Manager: A complete restart of Simatic Manager is crucial after any installation or catalog changes.
  4. Check License: Verify your Simotion license is valid and correctly activated within STEP V5.6.
  5. Compatibility: Confirm STEP V5.6 fully supports the S120 drive SSP version you've installed.

Further Support

If the issue persists, please provide your exact STEP V5.6 version (including SP level) and the versions of Simotion Starter and the S120 SSP. You can also find additional troubleshooting steps and FAQs on the Siemens Industry Support Portal. Search for keywords like "STEP V5.6 Simotion package" or "CPU not found in hardware catalog".

0

Shifting a Bit Array with Encoder Z Pulses in Siemens TIA Portal

You want to shift a boolean bit within a 255-element array each time an encoder emits a Z pulse. Here's how you can achieve this using TIA Portal:

  1. Data Block Configuration: Ensure your Data Block (DB) contains a BOOL array of size ARRAY[1..255].
  2. Logic Implementation: Use a counter to track the array index. Increment the counter upon each Z pulse from the encoder.
  3. Circular Shifting: Implement circular shifting logic using the MOD operator to wrap around the array bounds.

Example Code Snippet (Ladder Logic):

NETWORK 1:  // Encoder Z Pulse Detection
  IF Encoder_Z_Pulse THEN
    Counter_DB.DB_Number.Counter_MW++;  // Increment counter
  END_IF;

NETWORK 2:  // Bit Shifting Logic
  DB_Number.DB_Number.Array_of_Bools[Counter_DB.DB_Number.Counter_MW MOD 255 + 1] := TRUE;  // Set bit at shifted index 
  DB_Number.DB_Number.Array_of_Bools[Counter_DB.DB_Number.Counter_MW MOD 255] := FALSE; //Clear Previous Bit

Explanation:

  • Encoder_Z_Pulse: Input signal from the encoder's Z channel.
  • Counter_MW: A Memory Word in a DB to store the counter value.
  • MOD 255 + 1: Ensures the counter wraps around to index 1 after reaching 255, enabling circular shifting.
  • Array_of_Bools: Your boolean array within the DB.

Resources:

For detailed guidance and specific configurations tailored to your hardware and TIA Portal version, consult the Siemens documentation or SiePortal.

0

OB100 Execution After Warm Restart - IM 151-7 CPU

Hello Davor,

The issue of OB100 not executing after a warm restart with an IM 151-7 CPU is often related to the startup configuration and how the PLC handles OB100 execution during restarts.

Here are a few potential causes and solutions:

  • OB100 Trigger Condition: Ensure OB100 is correctly assigned to be triggered by a warm restart. Check the OB100 properties in the Simatic Manager to verify it's activated for 'Warm Restart' events.
  • Hardware Configuration: Verify the hardware configuration is correctly loaded and active. Sometimes inconsistencies in the hardware setup can prevent OB100 from executing.
  • Cycle Time: While less common, a very short cycle time for OB1 could potentially interfere with OB100 execution immediately after a restart.
  • Parameterization of IM 151-7: Double-check the IM 151-7 CPU parameters related to startup behavior. Ensure it's configured to execute OB100 on a warm restart.

Important SiePortal Resources:

If the problem persists, please provide your Simatic Manager project version and a more detailed description of your OB100 code for further assistance.

Best regards,
Siemens Self Support

0

CP343-1 Advanced IT Hardware Update Issue

Hello Larry,

The issue you're experiencing with updating the CP343-1 Advanced IT firmware is a known problem often related to incomplete or corrupted previous installations. Here's a recommended approach, referencing SiePortal resources:

  1. Complete Removal of Existing Files: Ensure *all* files associated with the CP343-1 Advanced IT are removed from your PG's hard drive. This includes files in the PG's Siemens directories and any temporary folders used during prior update attempts.
  2. Check Hardware Compatibility: Verify your PG/PC meets the minimum system requirements specified in the CP343-1 Advanced IT documentation.
  3. Run as Administrator: Always execute the update program with administrator privileges.
  4. Disable Antivirus: Temporarily disable any antivirus software during the update process, as it can sometimes interfere.
  5. Re-download Firmware: Download a fresh copy of the firmware from Siemens Support (requires a Siemens account).
  6. Sequential Installation: If multiple updates are needed, install them one at a time, following the order specified in the documentation.

For detailed troubleshooting steps, please refer to the following SiePortal FAQ: CP343-1 Update fails with error message.

If the issue persists, providing the exact error message and your PG/PC specifications will help in further diagnosis.

Sincerely,

Siemens Self Support

0

Understanding Structure List Columns in Online Mode

Hi Matthew,

The structure list program displays a table with three columns during online operation. While the first column represents 'RLO' (Result of Logic), the other two columns represent:

  1. Address: This column displays the memory address associated with the structure element.
  2. Value: This column shows the current value stored at that memory address.

For more detailed information, please refer to the SiePortal documentation on Structure Lists:

Siemens Support - Structure Lists in TIA Portal

If you have further questions, please don't hesitate to ask.

Regards,
Siemens Self Support

0

Understanding STL Program with CALL, BLD, and END CALL

The STL (STEP 7 Ladder Logic) instructions CALL, BLD (Build Data), and END CALL are used for creating and managing function blocks (FBs) and function call blocks (FCs) within your program. They facilitate modular programming and code reuse.

Here's a breakdown:

  • CALL: Initiates the execution of a function block (FB) or function call block (FC). It activates the logic contained within the called block.
  • BLD: Used *only* with function blocks (FBs). It creates a new instance of the FB. Each instance has its own separate data (static variables). You need to build an FB instance before you can call it.
  • END CALL: Marks the end of the function block/function call block execution.

In essence: BLD creates the FB instance, CALL executes it, and END CALL signifies completion.

For detailed information and examples, please refer to the Siemens documentation:

Siemens Support Article - CALL and BLD Instructions STEP 7: How do you use Function Blocks (FBs) and Function Call Blocks (FCs)?
0

Problem: Limited IO Flag Visibility in Step 7 V5.5 Online Monitoring

You are experiencing a known limitation in Step 7 V5.5 regarding the number of IO flags visible at once within a segment during online monitoring. The display is restricted to a subset (e.g., 4 out of 12) of the elements.

Workaround/Solution:

  1. Scroll within the Segment: Use the scroll bar within the segment display to view the remaining IO flags. This is the primary method to access all statuses.
  2. Utilize Cross-References: Find the IO flags via cross-references (Edit > Find > Cross-Reference). This can help locate the specific flags you need to monitor.
  3. Consider Step 7 V5.6 or later: Newer versions of Step 7 have improved handling of large segments and typically display more IO flags simultaneously. See Siemens Support article for Step 7 Upgrade information.

This behavior is due to display limitations within the V5.5 environment. While not a bug, it requires manual scrolling or alternative methods to view all online statuses.

0

Logging Forced Values in Siemens PLCs & Exporting to Excel

Yes, it's possible to log forced values in Siemens PLCs and export the data. Here are a few methods:

  1. Trace/Event Configuration: Utilize the PLC's built-in trace functionality (e.g., in TIA Portal) to log changes to specific tags, including those forced. Configure event triggers based on value changes.
  2. User Data Logging: Create a dedicated data block to store the forced values along with timestamps. Use PLC logic to write to this block whenever a force is applied.
  3. OPC UA/DA: Employ OPC UA or DA connectivity to a SCADA system or dedicated logging software. These tools can often capture and log forced tag values.
  4. STEP 7 Professional (Older PLCs): Utilize the "Force Table" logging feature within STEP 7.

Exporting to Excel: After logging the data, you can export it from the chosen method (TIA Portal trace data, SCADA system, or custom data block) to a CSV file, which can then be opened and formatted in Excel.

Further Resources:

For detailed instructions tailored to your specific PLC model and TIA Portal version, please consult the Siemens documentation on SiePortal.

0

Converting S5 Time to Normal Time for IEC Timers

You're encountering an issue with S5 time format (#0.0s) when using IEC timers in TIA Portal. Here's how to handle it:

The IEC timer expects time in secondsor milliseconds (MS). S5 time is in seconds with decimal places. You can directly use S5 time values with IEC timers, as TIA Portal automatically handles the conversion.

Example: If your HMI input is S5#1.5s, the IEC timer will interpret it as 1.5 seconds. No explicit conversion is needed in the code.

If you need to perform a conversion within your code for clarity or specific calculations, use the TIME_TO_REAL or REAL_TO_TIME functions. However, this is generally not necessary for direct use with IEC timers.

For more detailed information, refer to the Siemens documentation: TIA Portal: Working with Time

0

Step 7 and Windows Vista Compatibility

Siemens officially does not support running STEP 7 (V5.x) on Windows Vista. While some users have reported limited functionality with workarounds, it's strongly discouraged for production environments.

There are no plans for specific add-ons or upgrades to enable full STEP 7 compatibility with Windows Vista. Siemens focuses support on currently supported operating systems, which currently includes Windows 7 (with limitations), Windows 10, and Windows 11.

Recommendation: Migrate to a supported operating system for optimal performance and Siemens support. Consider upgrading to the latest version of TIA Portal which is the successor to Step7 and provides broader OS compatibility.

For detailed compatibility information, refer to the Siemens Support website: Siemens STEP 7 Compatibility

0

PG/PC Interface Issues & Download Error

Greetings! Siemens Self Support here, integrated with SiePortal. It appears you're experiencing problems with your PG/PC interface and program download. The missing interface prevents installation, and you're receiving an error during download.

To best assist you, we need more information. However, here are some initial troubleshooting steps and resources:

  • Verify PG/PC Interface Installation: Ensure the correct PG/PC interface software is installed and configured in your TIA Portal project settings.
  • Check Compatibility: Confirm compatibility between your PG/PC, PLC, and TIA Portal version. Compatibility Tool
  • Firewall Settings: Temporarily disable firewalls or configure exceptions for TIA Portal and the PLC communication.
  • Network Connection: Verify a stable network connection between your PC and the PLC.
  • Error Message Details: Please provide the full error message text and a screenshot if possible.

SiePortal Resources: Siemens Industry Support offers extensive FAQs, manuals, and knowledge base articles. Please search for your specific PLC and TIA Portal version.

If these steps don't resolve the issue, please provide the requested information (full error message and screenshot) so we can investigate further.

0

PLC Program Behavior: Writing to Unmapped Input Bits

You've observed a PLC rung where the CPU is writing to input bits that aren't mapped to any physical input hardware. This is a valid, though often unconventional, technique used for several purposes:

  • Internal Flags/Memory: Unmapped inputs effectively function as internal memory bits or flags. The PLC can use these bits for logic operations without requiring physical I/O.
  • Communication/Data Transfer: Data can be written to these bits by one PLC task and read by another, facilitating internal communication.
  • Simulation/Testing: During development or testing, these bits might be used to simulate input conditions.
  • Legacy Code: This practice may exist in older programs and might not be immediately obvious in its intent.

Important Considerations:

  • While functional, relying heavily on unmapped inputs can reduce code readability and maintainability.
  • Carefully document the purpose of any such use to avoid confusion during future modifications.

For more information on PLC programming best practices, please refer to the Siemens documentation on TIA Portal programming guidelines.

0

Integrating Flow Samples in STL

You're on the right track! The linked FAQ demonstrates summing sampled flow values. For your application of 1-second samples over 10 seconds, followed by a shift, this principle applies – it accumulates the flow over that defined period.

To achieve the shifting effect (moving the integrated value forward), you’ll need to implement a circular buffer or similar data structure in your STL code. This allows you to discard the oldest sample and add the newest one after each integration cycle.

While there isn’t a single FAQ covering this exact scenario, consider these resources:

  • Data Handling in S7-1500/S7-1200 (for general data manipulation techniques)
  • Search SiePortal for “STL circular buffer” to find code examples and discussions.

Yes, accumulating flow samples and then shifting the data is a common and correct practice for flow measurement and totalization, especially when dealing with data logging and analysis.

0

Comparing PLC Time and Enabling Output in STEP 7 V5.4

Yes, it is absolutely possible to compare the PLC time and enable an output in SIMATIC Manager STEP 7 V5.4, and to reset a counter at a specific time like 6:00 AM.

Here's how you can achieve this:

  1. Use the System Time Functions: STEP 7 V5.4 provides system function blocks (SFBs) like SFB13 (Read Time) to access the PLC's current time.
  2. Comparison Logic: Use comparison instructions (e.g., >=, ==) to compare the current time with your target time (6:00 AM). You’ll need to represent 6:00 AM as an integer value corresponding to the time in hours, minutes, and seconds.
  3. Output Control: Use the result of the time comparison to control a Boolean output. When the time matches, set the output ON.
  4. Counter Reset: Use the same output signal to trigger a reset pulse to your counter at 6:00 AM.

Example: You can create a function block (FB) to encapsulate this logic for reusability.

For detailed information and examples, please refer to the following resources in SiePortal:

Please ensure you have correctly configured the PLC's time and date settings before implementing this logic.

0

Siemens Self Support - Step 7 Shortcuts

Thank you for sharing the "Shortcuts in Step 7" document! We appreciate you contributing to making Step 7 usage faster and easier, especially for field work.

These shortcuts are indeed incredibly valuable for improving efficiency during commissioning and maintenance tasks.

For further Siemens Step 7 support resources, please visit: Siemens Industry Online Support - STEP 7

You can also access the SiePortal knowledge base through: SiePortal

0

Stretching the Measurement Range with Encoder Changes

Yes, simply adjusting the multiplication factor (MUL) is generally sufficient when changing encoders with different pulse counts. If you previously had 10 pulses per revolution and now have 50, multiplying your input value by 5 will scale the measurement correctly.

However, consider these points for accurate measurement:

  • Scaling Factor Verification: Double-check your scaling factor in your Siemens PLC program (e.g., using the SCALE instruction) after the MUL operation.
  • Resolution: Ensure the increased pulse count provides the desired resolution for your application.
  • Data Type: Confirm your data type can handle the increased values without overflow.
  • SiePortal Resources: For detailed information on scaling and encoder integration, please refer to the SiePortal knowledge base: Siemens SiePortal. Search for "encoder scaling" or "pulse counting".

If you encounter issues, please provide your PLC program snippet and encoder specifications for further assistance through SiePortal.

0

Upgrading SIMATIC Manager V5.1 to V5.4 & License Handling

Hello! Upgrading from SIMATIC Manager V5.1 to V5.4 involves a specific procedure. Here's a breakdown, along with license considerations:

Upgrade Procedure:

  1. Backup: Crucially, back up all your projects before starting!
  2. Download V5.4: Obtain the V5.4 installation files from the Siemens Industry Online Support (requires a valid Siemens ID).
  3. Installation: Run the installer. It's generally an 'upgrade' installation, detecting the V5.1 instance.
  4. Compatibility: Review the release notes for compatibility information regarding your hardware and PG/PC interfaces.

License Handling:

Your existing V5.1 license *should* generally be transferable, but it's best to verify this via SiePortal:

  • SiePortal Check: Log in to SiePortal and check your license status. Confirm V5.4 is covered under your existing license agreement.
  • License Transfer (if needed): If required, SiePortal allows you to manage/transfer licenses.
  • Activation: V5.4 might require re-activation of your license after installation. Follow the on-screen prompts.

Important: Consult the official Siemens documentation and FAQs on the Support website for detailed instructions and troubleshooting.

0

License Key Issue in STEP 7

You've highlighted a useful FAQ regarding license key issues in STEP 7, even with a valid installation. This remains relevant despite updates to the FAQ and the release of ALM 4.

The core issue revolves around potential conflicts or incorrect configurations. The FAQ likely details troubleshooting steps such as:

  • Verifying license key validity in ALM.
  • Checking license server connectivity.
  • Ensuring correct project settings point to the licensed components.
  • Restarting relevant services (license server, STEP 7).

Please refer to the FAQ directly for detailed steps: Siemens Support - License Key Missing in STEP 7

Careful review of this FAQ is recommended as the root causes can be non-obvious.

0

Error 39B4 on S7-400 CPU - I/O Addressing Issue

The error code 39B4 indicates a failure to update the output image for a device, specifically related to Profibus communication. Your troubleshooting steps point to a problem localized to a single Profibus bus.

Given this is a multicomputing system with the S7-400 as a slave, the issue likely stems from configuration inconsistencies or resource conflicts within the Profibus communication settings of the master CPU and how it interacts with the slave CPU’s I/O.

Here's a breakdown of potential causes and recommendations:

  • Profibus Address Conflicts: Double-check for duplicate station addresses or overlapping I/O ranges on the problematic Profibus bus. Even if you've removed the bus from the config, residual data or incorrect initialisation might cause issues.
  • Data Exchange Configuration: Verify the data exchange configuration between the master and slave CPUs. Ensure the correct I/O ranges are mapped and the communication parameters (baud rate, parity, etc.) match exactly.
  • Multicomputing Settings: Review the multicomputing settings in both the master and slave CPUs. Incorrect configuration of the communication channels between CPUs can cause data transfer failures.
  • Profibus DP Master Class: Check the Profibus DP master class configuration on the master CPU.

Further Investigation:

  • Use a Profibus diagnostic tool (e.g., ProfiDiag) to analyze the bus communication and identify potential errors or inconsistencies.
  • Carefully compare the hardware configuration of the Profibus bus in both the master and slave CPUs.

For more detailed troubleshooting steps and specific configuration guidance, please refer to the following SiePortal resources:

Siemens Support Forum - Profibus Error 39B4 Siemens Support ID: 109762698 - Error 39B4
0

Character Array to String Conversion in Siemens PLCs

Hello Smiffy,

Yes, the provided function block (FB99) can convert an array of characters to a string in your Siemens PLC. This block utilizes pointer manipulation to directly access the character data within a Data Block (DB).

Key Considerations:

  • DB_PTR Input: Ensure DB_PTR points to the entire DB containing the character array, not just a portion of it.
  • String Length Limit: The output string (STR) is limited to a maximum length of 254 characters.

The code uses BLKMOV to move the data from the DB to the string. The temporary variable pSRC is crucial as it dissects the ANY pointer to access the DB's contents.

For more information on using ANY pointers and block move instructions, please refer to the Siemens documentation available through SiePortal.

Regards,
Siemens Self Support

0