Back

Topic

[KB227]How to run PcVue in simulation mode

Tags: Command line, Simulation

14 years ago
By RM
Options
Print
Applies to:

PcVue version 7.20a onwards.


Summary:

When you run PcVue in simulation mode, the values of Database bit and register variables will vary automatically.


Details:

There are two ways of doing this:

  • Using the command line switch -simu.
  • Using the PROTOC.SIM file (no more available since version 16).

Using the switch -simu

To run PcVue in simulation mode, such as for demonstration:

  1. Right-click on the PcVue icon to open its Properties dialog.
  2. Add the option -simu to the Target shortcut.

PcVue_Properties_dialog_simu_mode

  1. Restart PcVue to run it in simulation mode.

Using the PROTOC.SIM file

Caution: Since PcVue version 16, protoc.dat and protoc.sim files have been removed. It is now possible to manipulate protocols by editing CimWayProtocols.xml. Don’t forget to create a backup before any modification.

This CIMWAY-related method consists of replacing the contents of the file PROTOC.DAT with those of PROTOC.SIM.

Note

It only allows you to simulate Equipment variables linked to currently loaded CIMWAY protocols.

Internal variables and OPC variables are unaffected.

  1. If the PcVue project is running, close it down.
  2. Open the BIN folder of the PcVue software.
  3. Rename PROTOC.DAT file (to PROTOC.DAT.OLD, for instance).
  4. Open PROTOC.SIM with a text editor to find the protocol number corresponding to the protocol in use.

For details, see the article How to identify protocol .DLL files used in a project.

For instance, if you use the Open Modbus TCP/IP protocol, the protocol number is 263.

  1. Modify the line:
  • From 7.20a up to 9.0, replace

PROTOCOL,263,20,CWSMNG.DLL

with:

PROTOCOL,263,10,CWSIMU.DLL

  • 10.0 onwards, replace

PROTOCOL,263,20,CWSMNG.DLL

with:

PROTOCOL,263,10,CWPSIM.DLL

  1. Save the file PROTOC.SIM as PROTOC.DAT.
  2. Restart the project.

In the HMI, you should then see all displayed Database (but not internal) variables behave as follows:

  • Bit variables toggle every 100ms.
  • Register variables increase their values every 100 ms.

Changing a variable’s default behaviour

You can modify the default manner in which a variable behaves in simulation mode.

  1. Create a file named CWSIMU.INI for 7.20a up to 9.0, or named CWPSIM.INI (10.0 onwards)  in the project’s BIN folder as follows.

[DATA]

STEP=1

[FRAME]

DELAY_WAIT_READ=150

DELAY_WAIT_WRITE=150

simu

  1. Restart PcVue to apply the configuration changes from the .INI file

For further information

In the main Help folder Installing the Software, the topic Command Line Options explains the use of command line switches.


Created on: 26 Nov 2010 Last update: 13 May 2024