Easy Configuration with PiCtory

PiCtory Banner

PiCtory is a perfect tool to define the physical position of hardware modules and symbolic names of their in- and outputs. These definitions are written to a JSON file and used by our main driver PiControl and all other drivers. But PiCtory also enables you to define configuration values for hardware modules or installed drivers.

So here are the features of PiCtory:

  • Browser based application – no separate installation
  • Tree-view of device catalogue, you can add own device definitions
  • Devices are placed by drag and drop just like they are arranged on the DIN-rail
  • Placement of devices is assisted by rules
  • Devices and other adapters are represented by their picture
  • You get detailed information for each device on a device data sheet
  • File based system (no database is used)
  • Uses flexible and alterable export formats
  • Direct export of EN 61131-3 compliant ST VAR_GLOBAL declaration
  • All relevant files are saved in text editor readable standard JSON format (no binary files)
  • Complete configuration can be saved as RSC (“RevPi System Configuration”) file
  • Runs on all web servers with PHP support

Ready for more information? Go on reading…

Revolution Pi is a highly modular and expandable system. E.g. you may write your own driver to support and smoothly integrate your specific hardware into the system. The central process image is the link between all components. These components – hardware modules or software applications – do always exchange their data via the central process image. To get this result every driver or software application must know where specifically (i.e. at which address) to find single process values. Let’s assume your system uses two RevPi DIO and you’ve connected light barrier #17 to input #5 of second DIO module. Your application (e.g. the soft PLC) needs to know at which address of the central process image it can find the state of the light barrier #17. Now this is the point where PiCtory comes in.

PiCtory is a browser application. That means it is running on a web server and you get access to the user interface by an ordinary browser. We’ve preinstalled the web server on RevPi Core but you may use a small installable version for Windows PC as well. PiCtory assist you to define every IO signal of your system. You can define symbolic names (“light barrier #17”) and define which “adapter” is delivering or reading the data (input #5 of DIO #2 module left side of RevPi Core). “Adapter” is a synonym for a hardware module connected via PiBridge or any “virtual device”. This is a driver software for which a certain amount of memory is allocated in the central process image and for which process values with symbolic names may be defined.

After you have defined all IO signals PiCtory calculates the exact addresses in the central process image and writes them (together with the symbolic names) into a JSON file. Drivers like our PiControl are reading this file during startup and thus know where to get or put process data. If you are going to write your own drivers or application software you may read this file too to get the addresses you need. But we’ve even provided a much easier way to get this information: Just use a software call to a function of PiControl. You need to use the symbolic name as parameter and you get back the start address and length of data in order to know where to write or read your data in the central process image (using again function calls to do that).

PiCtory does more than assisting you by administering the central process image. It is a configuration tool enabling you to define any configuration value for any of the adapters (hardware modules or drivers) and deposit them in the JSON file. PiControl does read these configuration values during startup and transmits them to all RevPi Modules connected to PiBridge. E.g. RevPi DIO modules need to know the output type of each output pin which can be either high side switch or push-pull which is defined by configuration information.

PiCtory is programmed to be very versatile and should also work with devices or drivers built by you. But how should PiCtory know how many process values and which type of values your hardware or your driver can handle? And how should it know which configuration values your hardware or driver needs and what these values are called? That’s pretty easy with PiCtory: There must be a “RevPi Adapter Profile” file (“RAP-file”) for each adapter. PiCtory does read these files and their content is telling it which Io data is handled by the adapter and which configuration settings should be available. You even may define rules in that file which e.g. would force the user to place adapter only on certain positions of the DIN-rail (e.g. RevPi Gate modules are only allowed as last device on left or right side of the PiBridge. RAP-files can be written with any text editor. You will get more information in our next blog article.

So you can easily define all system parameters of a modular RevPi system using PiCtory. There is also an export function which uses adoptable formats and of course you can save the whole configuration and environment settings as “RSC”-file (“RevPi Configuration File”).

May be this was too theoretical and you would prefer a more practical explanation. So here is a simple workflow with PiCtory:

1. Start your browser and enter the PiCtory web server’s address (the server is already running on RevPi Core or can be installed on a windos PC using our software): The adapter catalogoue shows a tree view of all available adapters and their sub-types (versions). Own drivers may be added to this tree. I you click on an adapter it’s data sheet is loaded. You get a picture or symbol of the adapter and all required information to make the right choices. Data sheets are stored as simple HTML files so they may be changed or added by you.

2. Drag and drop all adapters you need to the central workspace. Their picture or symbol will be displayed there using three different zoom factors. You can simply rearrange the adapters using your mouse until they resemble the actual arrangement on the DIN-rail. PiCtory does test if positions are allowed or not. Any other adapters which are non-hardware modules (e.g. our Modbus driver) can be placed on a reserved area of the workspace.

3.Each adapter placed on the workspace generates an entry in a table with adapter properties. In this table you can define symbolic names for the adapters (e.g. “DIO_2_light_sensors”) and may choose the variant if the adapter has any.

4. All defined in- and output lines of an adapter which are defined in its RAP-file are listed in the table of values. You can define symbolic names for them as well as standard values and comments.

5.At the end you need to check everything and start the export for files used by PiControl and Soft-PLC or other applications. Finally you save the whole PiCtory project as RSC-file and you’re done!

What is next?
In our next blog article we will explain in detail how to define own devices (adapters) and add them to the adapter catalogue. We will also explain how to define your own export format.

One thought on “Easy Configuration with PiCtory”

Leave a Reply

Your email address will not be published. Required fields are marked *