Download Latest Version Version1.00.zip (414.3 MB)
Email in envelope

Get an email when there's a new version of Pure Godot Derivative OIP project

Home
Name Modified Size InfoDownloads / Week
Readme.md < 30 mins ago 11.8 kB
Version1.00.zip < 30 mins ago 414.3 MB
Totals: 2 Items   414.3 MB 0

Pure Godot Derivative OIP project - version 1.00

Factory 3D simulation / Digital Twin for PLC programming

This project is an OIP derivative running in a not modified Godot implementation.

Run cannot be done in Editor mode as in OIP orignal version.

Communication with PLC is centralised so injection of Failure can be simply done by changing Tags value. Tag selection \& debuging is easier.

User contribution integration is FAST.

Application is expected to be in the res://Application directory Wirth the Appdata/Channels.json for PLC configuration (manual changes with ... notepad, leafpad !).

So that transport of the simulation could be made only with the copy of the res://Application directory. If the version is the same (noted here on top 1.00), portability is insured.

Contributions:

Feel free to send very or less usefull devices/actuators/sensors/misc content. The rule is : all must be put in a subdirectory of res://part :

  • tscn
  • scripts
  • meshs
  • sharders
  • copyright/licence file if any
  • … other things, with sub directory if required

Usage of today res://assets can be done, but with no addition on it. It's close.

Usage of others res://parts can be done, but without stability garantee (normaly it is).

Please add a Readme.md (or .txt) in the res://parts if required to describe/motivate and or explain how to use the content.

Avoid heavy meshs and textures, the objective is PLC programming/Factory simulator/Digital twin not Hollywood, simple is beautiful (but sometimes it's fine, such as AGV or Container Trailer).

Post a .zip or an svn patch here on Sourceforge for contributions.

Usage/Configuration:

Launch godot4.6 then select the Scanner button to open the project. Be patient the first time (even if everything seems to be displayed).

Open the scene res://Application/Main.tscn, then run it on the upper right corner (depending on PLC drivers, a firewall warning can be fired).

If you are new with Godot have a look to this 10' tutorial : First Interactive Godot Tour. It's for developpers but a lot of elements are OK for user in the 5 first minutes.

Simulation Items can be Added to the scene, see the bottom dock. Drag item and drop it in the scene, then look at the properties inspector at the right of the screen.

You can try to remove the [rendering] section in the project.godot file for Forward+ graphic card usage, if supported.

Remove .godot directory for archive, zip or copy, content will be re-generated.

Standalone .EXE runtime code can be generated without any modification (*.json \& *.dll could be added to export items option)

To avoid any errors: set dev://parts and dev://assets directories to read-only.

Feel free to re-organize the "Simulation Items" dock.

You can deleted unused items by removing the corresponding res://parts directoy. Read before a file _dependency.txt in the directory if exist.

Basic elements:

  • Building : Original OIP content for walls, roof, floor

  • CameraSwitch : used to add as much camera as you want, see the button in running mode to switch and save positions.

  • FreeCamera can be added in the sub tree (right click, add a child node, then FreeCamera)

    • can be used for some interaction with items (push Box, acting Cylinder/Gripper, ...)
    • remember to add one close and well oriented to sub-scene during tests to avoid useless manipulations
    • keyboard shortcut F1 to F7 can be used for the first 7 cameras, then used the button if more are placed !
    • other kind of Camera with another control behaviour can be add also
    • Keyboard S save the current location of all cameras and load them at runtime (file Appdata/Camera.json, can be removed)

    • even if a camera in the tree is removed, it's saved location is for the follwing one.

  • CommScreen : can be used to show communication Tags value and allows to force write somes (Failure injection like actuator/sensors default).

  • it is present in the original scene close a wall

  • several CommScreen can be added
  • place one FreeCamera in front of it, it's a simple way to see/force Tags value.

Simulation Items:

Items are noted (OIP) if they come from the original OIP project, with small or heavy adaptations.

Moving Parts:

  • Box (OIP)
  • Pallet (OIP)
  • Tray
  • UserPart : same as Box but with your mesh (drop it into the User Mesh property : try the attiny85-20pu.obj sample in res:://parts/Box). The collision form is always the original bounding cube. A name can be associated to it (directly or through the spawner). This name will be used by the OIPCamera to identify the part.
  • Spawner (OIP) for each type of part, can be enabled/disabled in running mode by using the Space key, if not associated to an active PLC Tag. For the UserPartSpawner drop meshs to define the display pattern.
  • Despawner (OIP) to remove parts in it's field

Parts can be pushed in running mode by using the Space key or mouse left click, for failures simulation.

An RfId Tag can be attached to each component (can be seen on the form of a barcode on a side). Can be done with an RfIdReader with the option CreateTagIfNotExist set to true.

Actuators:

  • BladeStop (OIP)
  • ChainTransfert (OIP)
  • Cylinder : can be used to attach a tool at it's extremity such as Gripper or Vaccuum or other (conveyor !!??)
  • Diverter (OIP)
  • Switch
  • Drill tool
  • Linear and Rotative Axis : can be used to attach a tool, another axis or ... a Stair or other ! An object cannot be links to several axis and cylinders, but a chain of links is OK. See the associated Readme file in res://parts/Axis.
  • Vaccuum (OIP)
  • Gripper
  • AGV (OIP). Register waypoints with only one rotation or one translation and go waypoint to waypoint to avoid strange behaviour. Don't spend time to got a pallet like a real one (it's a cube, not a complex collision object).
  • Amazing Conveyors (OIP)
  • Ganty (OIP)
  • Six Axis Robot (OIP)
  • Turntable (and elevator)

Some actuators can be used in running mode by using the Space key, if not associated to an active PLC Tag.

Sensors:

  • Diffuse/InfraRed Sensor (OIP)
  • Color Sensor (OIP): detect a range of user defined colors
  • LaserSensor (OIP) for distances measurment
  • OIPCamera. Same as color+laser and detection of part type (Box, Pallet, Tray) or associated name for UserPart : see PartDetected Map property for that
  • Proximity Capacitive/Inductive sensor, same as Diffuse sensor with another form factor
  • RfIdReader/Writer : can read/write (key, value) data to Box/Part/Pallet/Tray or just attach an identifier (user such as a barcode or automaticaly defined). You can add an RFIdReader hidden in a spawner with a short view distance and the option CreateTagIfNotExist set to true, so that every item is associated to an RfIdTag with your data written on it.

Hmi devices:

  • LightIndicator, 1 or more color, blink option with configurable period
  • StackLight (OIP) with several segments
  • Push Button (OIP), with a light and an optional emergency stop form feature
  • Selector button, 2 to 4 positions.
  • Analog Button

Push/Selector/Analog buttons can be used in running mode with the Space key.

Structure:

  • Platform (OIP)
  • Stairs (OIP)
  • Fence (OIP), SafetyGate (OIP)
  • FloorMarking (OIP)
  • GardRail (OIP)
  • Legs (OIP)
  • Rack (OIP), Container Trailer (OIP)
  • DoorDock (OIP).
  • Some simple stuff : Aligner, Metal Corner, Electric Enclosure, Table
  • UserStaticFeature with your own mesh. The collision form is always the bounding cube. Can be attach to a Linear/Rotative Axis or a Cylinder for instance, but also to place a couch somewhere on the scene !

Plc Communication Protocols:

Protocols are noted (OIP) if they came from the original OIP project.

Communication is described with a configuration file (res://Application/Appdata/Channels.json). The Godot Menu Project->Tools->PLcCom allows to open the file, to reload it and to shows a panel with the Tags.

In the file, after a mandatory section with the PoolingRate (pooling with PLC in ms), CopyRatio (how many pooling before a copy process), and an EnableLog parameters (additional trace informations), channels description should be done. A channel name and a type is required, additionnal parameters sometimes, then all Tags with the logical name and the protocol related identifier.

When the channel type start with # it is desactivated. Tags continue to appears in the select box but communication will never start in run mode. When the channel type start with ## it is like deleted. It is used here in the example file to show several configurations. But removing channel will removes all references to Tags in the differents location, so avoid to do it.

One can find some files readme_xxx.txt in res://docs/plc_drivers to describe how protocol related identifier can be set.

Protocols and channel type identifier to be used are :

  • EtherNet/IP (OIP) with libplctag free library. Channel type identifier is ab_eip. The CIP tag name is as defined in the PLC program, e.g. MyTag, Program:MainProgram.MyTag, myUDT.field, myArray[0].
  • Modbus TCP in client mode (OIP). Channel type identifier is modbus_tcp. A register type prefix followed by the register number. Prefixes: co (coil), di (discrete input), hr (holding register), ir (input register). For example: hr0, co21, ir64000. hr and ir MUST be prefixed with the required quantity if any : 2ir0 for 2 registers (ie 2*2 bytes used by int32 and float), 4hr12 (ie 8 bytes used by int64 and double). The PLC is the server listening on TCP port 502. The memory model is bigendiant only.
  • Modbus TCP/UDP in server mode. Channel type identifier is mbsrv. Same register identification as modbus_tcp channel (apart prefix quantity not required but accepted). PLC is the client, Godot simulation is the server listenning of both TCP \& UDP Port 502, acting like a remote IO device.
  • OPC UA in client mode (OIP) on a ((None, None), Anonymous)) unsecure channel with open62541 free library. Channel type identifier is opc_ua. Tags used the full NodeId. For example, ns=2;s=MyVariable or ns=2;i=12345.
  • Siemens S7 Put/Get protocol in client mode for 1200, 1500 \& PlcSim Advanced. Channel type identifier is s7. Register identifier Ix.y, Qx.y, Mx.y (coil), IBx, QBx, MB.x (byte), IWx, MDx, QLx, ... (word, double word, and non standard L notation quad word). The Input memory space can be written if they do not overlap the rack \& Profinet inputs. The Output space can be written also under the same condition.
  • Simulator. Channel type identifier is simulator. Tags are internal and calculated with several functions, logic and arthmetic operators. An integrated Json-RPC server allows to access locally or remotly to Tags.

Automatic copy from Tag to Tag (even between channels) can be configured in the file res://Application/Appdata/AutomaticCopy.json. This is mainly dedicated to copy tags between the Plc channels and the simulator, to generate on the fly modifications of values between the simulator and the PLC (delay, scale, ...).

When a copy is configured, one can see it with the Tag viewer (Menu Project->Tools->PLcCom->Show tag), for instance as Sim.V1 <- Sim.V2. This copy is not done when the destination is override by a Failure injection. Access conflics can occur, you should take care. Writing a tag in such a way (like with Failure injection CommScreen ) do not change the infered data type. So if an object read it as a bit (cylinder command for instance) then writing 3.14159 will shows … a bit to 1 !

Source: Readme.md, updated 2026-06-19