Input operation with acknowledgment using WinCC input/output fields - Database & Sql Blog Articles

SMD aluminum electrolytic capacitor
Brand AVX TPSE226M035R0125 Low impedance tantalum capacitor AVX 22
Electronic scale crystal oscillator 3.2*2.5mm 3225 16M (16.000MHZ) 12PF 10PPM 20PPM 30PPM
Huaqiang Square crystal original spot stock

In real-world applications, certain critical data inputs require the operator to confirm any errors before proceeding. For example, when a value is entered into an input/output field and the Enter key is pressed, the system does not immediately update the variable. Instead, a confirmation dialog appears. If the user clicks "Yes," the new value is applied; if "No" is selected, the original value remains unchanged.


Figure 1

This functionality can be implemented in WinCC using input/output fields. Below is a step-by-step guide on how to set it up.

1. Prerequisites

Create two variables of the same data type: one named DisplayValue, which is the actual variable being controlled, and another named TempValue, used as a temporary storage. These variables will help manage the input process and ensure that changes are only applied after confirmation.


Figure 2

2. Input/Output Field Properties

Add a new input/output field to your screen and open its properties. Navigate to the Output / Input tab, select Output Value, and right-click on the dynamic part to open the dynamic configuration dialog.


Figure 3

Select the variable you want to control, such as DisplayValue, and configure the data type accordingly.


Figure 4

3. Event Settings for Input/Output Fields

3.1 Change Action Settings

Go to the Event section, then Attributes > Output / Input > Input Values. Right-click on the Change Actions section and set up a direct connection to the temporary variable TempValue.


Figure 5


Figure 6

3.2 Keyboard Release Action Settings

Open the Event menu again, go to Keyboard > Release, and right-click on the action area to open the C Action Editor.


Figure 7

Write code to detect when the Enter key is pressed. This will trigger a confirmation message box.


Figure 8

The code might look like this:

  Int TempValue = GetTagWord("TempValue");
  Char szBuffer[20];
  Sprintf(szBuffer, "Input number: %d", TempValue);
  If (nChar == 13) // if Enter key is pressed
  {
      Int xRet = MessageBox(NULL, szBuffer, "Confirmation Window", MB_YESNO | MB_ICONQUESTION | MB_SYSTEMMODAL);
      If (xRet == IDYES)
      {
          SetTagWord("DisplayValue", TempValue); // apply the new value
      }
  }
  

When the application runs, pressing Enter in the input field will bring up the confirmation window shown in Figure 1, ensuring the operator reviews the input before it's applied.

4. Additional Information

This setup was tested on Windows XP Professional SP2 with WinCC V7.0 SP1 ASIA. For more details about the MessageBox function, refer to Microsoft’s official documentation.

Anti-mouse Ants Solar Cable

Anti-rat ant Solar Cable is a kind of cable specially used for photovoltaic power generation system, its main function is to prevent small animals such as mice and ants from destroying the photovoltaic line.

The characteristics of anti-rat ant solar cable are as follows:

1. Anti-ant performance: anti-rat ant solar cable adopts special materials and technology treatment, has strong anti-ant performance, and can effectively prevent the invasion of ants and other small animals.

2. Anti-bite performance: anti-rat ant solar cable has good anti-bite performance, can resist the bite of mice and other animals, to avoid short circuit, fire and other safety hazards.

3. Weather resistance: anti-rat ant solar cable is made of high-quality materials, has good weather resistance, and can run stably for a long time under various harsh environmental conditions.

4. Easy installation: The installation method of anti-rat ant solar cable is the same as that of ordinary light cable, without additional tools and equipment, easy and quick installation.

5. Efficient performance: anti-rat ant solar cable has low resistance and high conductivity, which can ensure the efficient operation of photovoltaic system.

In short, the anti-rat ant solar cable is a kind of cable specially designed for photovoltaic power generation system, with the characteristics of ant-proof, anti-bite, weather resistance, easy installation and efficient performance, which can effectively protect the solar cable from the damage of small animals such as mice and ants.

Anti-Mouse Ants Solar Cable,Adapter Cable,Ant Rat Resistant Solar Cable,Ant Resistant Dc Cable

Suzhou Yonghao Cable Co.,Ltd. , https://www.yonghaocable.com