simple_plc_simulation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| simple_plc_simulation [2020/07/20 01:09] – [TransSECS Devices Example] wikiadmin | simple_plc_simulation [2023/08/06 13:56] (current) – [MIX] wikiadmin | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| **java.io.tmpdir** - this can be left at its default, which is the system' | **java.io.tmpdir** - this can be left at its default, which is the system' | ||
| + | |||
| + | Note: be sure that the directory you use for the java.io.tmpdir setting exists on your harddrive before running the configuration. | ||
| **vib.sharedplcsimulation** - this is mandatory and is set to " | **vib.sharedplcsimulation** - this is mandatory and is set to " | ||
| Line 34: | Line 36: | ||
| < | < | ||
| - | java -Djava.io.tmpdir=C: | + | java -Djava.io.tmpdir=C: |
| </ | </ | ||
| - | When run.bat is used to start the application, | + | When run.bat is used to start the application, |
| {{: | {{: | ||
| + | ====Using ErgoTechConfiguration.properties for Device Simulation===== | ||
| + | |||
| + | Using the parameters above, instead of editing the run script, you can add these parameters to ErgoTechConfiguration.properties. Add a section starting with a comment such as: | ||
| + | |||
| + | < | ||
| + | #for simulating devices, remove if not simulating | ||
| + | java.io.tmpdir=C:/ | ||
| + | OmronFins.simulate=true | ||
| + | vib.sharedplcsimulation=true | ||
| + | </ | ||
| + | |||
| + | if the example above, the device server OmronFins would be simulated | ||
| + | |||
| + | ====MIStudio Example==== | ||
| + | |||
| + | MIStudio can be set up to use the plc device simulation also. Three parameters can be added to MIStudio.conf, | ||
| + | |||
| + | Make a backup copy of the MIStudio.conf file and open MIStudio.conf in a text editor such as Notepad++. | ||
| + | |||
| + | Find the section headed "# Java Additional Parameters" | ||
| + | |||
| + | < | ||
| + | ... | ||
| + | wrapper.java.additional.9=-Djava.io.tmpdir=C:/ | ||
| + | wrapper.java.additional.10=-DModbusTCP.simulate=true | ||
| + | wrapper.java.additional.11=-Dvib.sharedplcsimulation=true | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | When you start MIStudio the simulator for a Modbus device called " | ||
| + | |||
| + | **Note: Do not toggle MIStudio into " | ||
| + | |||
| + | To test the shared PLC simulation with the TransSECS Devices example above, start a new MIStudio project. In the Design Window add a SwingTextField and an Annunciator, | ||
| + | |||
| + | Connect the SwingTextField to the input of the Modbus4XInt component, and the output of the Modbus4XInt to the Annunciator. | ||
| + | |||
| + | Open the Test Frame in MIStudio and enter " | ||
| + | ====MIX==== | ||
| - | ====Example==== | + | MIX is set up in the same way as MIStudio. Edit the MIX.conf to add the three parameters as for the MIStudio example taking care to add the java.additional parameters in numerical order. |
| + | Alternatively, | ||
| - | -Djava.io.tmpdir=F: | ||
simple_plc_simulation.1595221764.txt.gz · Last modified: by wikiadmin
