List of Available JSON Attributes

In this chapter you will find a list of all attributes you need to create a RAP file.

Aidinternal ID of the module/deviceStringnecessary
Bversionmodule/device versionStringnecessary
Ccommentinternal comment, e.g. for explanationsString-Arrayoptional
DscreencommentPreset comment for the device type, which is displayed in the comment column of the application’s device information table; can be changed by the user for each device.Stringnecessary
EsizeWidth of the expansion module; can be used, for example, to determine whether there is enough space on the DIN railStringoptional
FdevicetypePositioning type of the device; determines at which position a device can be inserted (please enter in capital letters)

BASE Connect unit; must be positioned first

LEFT module can only be positioned left of the Connect unit

RIGHT module can only be positioned right of the Connect unit

LEFT_EDGE module can only be positioned on the far left

RIGHT_EDGE module can only be positioned on the far right

LEFT_RIGHT module can be positioned left or right of the base unit

RIGHT_LEFT module can be positioned left or right of the base unit

VIRTUAL virtual device – is automatically placed into the virtual device area.

GproducttypeUnit number of the KUNBUS product lineNumnecessary
Einput / output / memoryActual operating data (‘ attributes’) of the device which are modified during operation; a data declaration consists of the following values (E. 1 to E. x) described below. Both input, output and memory array must be present in the file – but allowed to be blank ([])Objekt-Arraynecessary
E.1nameName of the value
WICHTIG: blanks in the name will be replaced by underscores when reading the file! Avoid blanks as far as possible.
E.2typeDIN61131 data type; e.g. BOOL, BYTE, WORD; in capital lettersStringnecessary
E.3rangeValidity area of the value input; depending on the type, plausibility checks or predefined drop-down lists are generated from this. Each’ range’ entry consists of two subentries following this pattern:

“type”: “tooltip_loop”,
“values”: [0,1,1]

Available type/values combinations, see E.3.1 to E.3.3

E.3.1Range type 01:
Creates a drop-down list from the loop values defined in the ‘values’ array, e.g. “values”: [0,10,1.5]

Creates a drop-down list with values from 0 to 10 with step size 1.5 ( 0, 1.5, 3, 4.5, 6 … etc.)

E.3.2Range type 02:
Creates a normal text input field that displays the valid value range in a tooltip when touched with the mouse; the value range is checked after input and generates an error message if entered incorrectly.
E.3.3Range type 03:



Generates a drop-down list from the value constants defined in the values array::

“values”: [

The entries in front of the “|” symbol are displayed as readable text in the dropdown box, the entries behind the “|” symbol are exported as actual work value.

FdefaultDefault value of the attribute; Important: please make sure that it is within the value range defined with’ range / values’! When using ‘list’ range type the value must be after the ‘ |’ separator!!Stringnecessary
GunitText string that describes the unit of the attribute value; appears in the’ Unit’ column of the editing table; if its left blank, the data type is displayed as a unit.Stringoptional
HtagsAny arbitrary descriptive text tags of the attribute; however, at least the attribute area (‘ input / output / memory’) and the’ type’ of the attribute (bool, byte, word etc.) must be specified, separated by commas!

Note: The range and type of the attribute are stored redundant in the tags for easier and more efficient processing of the RAP file. THEY SHOULD NOT BE IN CONTRARY TO THE TECHNICAL AREA/TYPE DETAILS!

IeditEdit mode of the attribute; determines which part can be entered or changed by the user; valid here are values between 0-4

neither name nor value of the attribute can be edited
Value of the attribute can be edited
Name of the attribute can be edited
Both name and value of the attribute can be edited

Value line is not displayed in the edit table (for constant, unchangeable values that should not be displayed to the user)

JorderSort order, i. e. relative position in the edit table display; here any numeric values with gaps can be entered, which then lead to an ascending sorting, e. g. 10,20,25,99 etc. NOTE: please do not use values twice, otherwise the sorting will lead to unpredictable results.No.necessary
KoffsetMemory offset of the attribute; first attribute of the device starts at’ 0′; in order to ensure correct continuous assignment of the offsets, please enter the appropriate offset distance to the next attribute depending on the value type (‘ type’ entry, e. g. BYTE), Example:

“name”: “Input01”,
“offset”: 0,
“name“: “Input02”,
“offset“: 2

Input01 occupies the bytes 0 and 1 as WORD value; the offset of Input02 therefore starts with byte 2.… etc.

LmultiInteger value from 1 to n; generates the desired number of multiple attributes from the attribute (primarily to save redundant data entry for many similar or related values); a sequential number is appended to the name of the attribute, for example:

“name”: “Input01”,
“multi”: 3

… creates attributes Input01_1 to Input01_3


If no “multi” value is set, the default value is 1.

If no multi value is defined for BOOL values, the multi value is automatically fixed to’ 8′ when reading RAP files internally, in order to set them to byte limits. A multi value in the file overwrites this default setting – make sure to define only multiples of’ 8′!!

Mactivetrue or false; defines whether an attribute value is taken into account at all when reading the RAP file or not. This enables you to completely deactivate attribute values.Booloptional
Nexporttrue or false; determines whether or not the attribute value in the Export column of the editing table is selected for export by default.Booloptional
OcolorEditHex color code between #000000 and #ffffff; sets an individual background color for the editable input field; if this value does not exist, the default value from the config.json file is used. („colors“:{colorEdit …Hex-coloroptional
PcolorReadOnlyHex color code between #000000 and #ffffff; sets an individual background color for a NON-editable (read only) input field; if this value does not exist, the default value from the config.json file is used. („colors“:{colorReadOnly …Hex-coloroptional
QcolorTextEditHex color code between #000000 and #ffffff; sets an individual text color for the editable input field; if this value does not exist, the default value from the config.json file is used („colors“:{colorTextEdit …Hex-coloroptional
RcolorTextReadOnlyHex color code between #000000 and #ffffff; determines an individual text color for a NON-editable (read only) input field; if this value does not exist, the default value from the config.json file is used. („colors“:{colorTextReadOnly …Hex-coloroptional
SVariant-specificTo create a variant hierarchy (see 4.) the following additional entries are required after an input / output entry:

“variants”: [
“id”: “Variante 001”,
“isDefault”: true,
“data”: [

The variants “id” will be displayed in future versions of’ PiCtory’ for variant selection. Here you should enter a descriptive text which must be UNIQUE.

„isDefault“ specifies the default variant after the RAP file has been imported into PiCtory. Please pay attention to the defined rules and consider them when setting ‘isDefault’. PiCtory currently applies the rules only if the user changes the variant manually and cannot resolve contradictions with ‘isDefault’ entries!

Within the “data” array, the ‘normal’ input/output attributes are entered again, as they would be done without variants.

PLEASE NOTE: by using variants, the type of an input/output entry changes from array to object (rectangular brackets to curly brackets), e.g.

“input”: [ …


“input”: { …

TlangTo enable internationalization of the value display, the names (labels) of the working values are used as pointers to the corresponding national designations. If a label entry begins with the prefix:’ lang_’, it is interpreted as a pointer. Without this prefix, the value is stored in the display as specified..

work unit: “lang_input”:”8″

internationalization area

“de”: {
“input”: “Eingang”,
“output”: “Ausgang”
“en”: {
“input”: “Input”,
“output”: “Output”

Rendering in the value editor if German language is set:

Eingang: 8







Contains the RAP file variants for both input and output entries and can be used to create a logical link between input and output variants by specifying’ rules’. This causes’ PiCtory’ to automatically’ synchronize’ the linked variants, for example, as soon as a variant is selected. Example:

“rules”: {
“IO”: [
“sync” : [0,0]
“sync” : [1,1]

In this example, the 0th input and the 0th output variant, as well as the 1st input and the 1st output variant are linked. If the user changes the input to variant 1,’ PiCtory’ automatically changes the output to variant 1. If output is then reset to 0, the input atomatically jumps back to 0.

includeTo integrate data definitions created by external configuration tools, the contents of an input, output and memory block can also be read from an external file at runtime (where’ PiCtory’ reads in a RAP file). A corresponding block has to be encoded like this:

“include”:”[path to Include file]”

Note the following points:
The path to the include file must be physically and permission-related defined in such a way that it can be reached by an Ajax call (user context of the web server)

The contents of the include file must be in JSON format.; it replaces the „input“ object-block {} completly, that means, it is NOT only added into the object block at the place of the “include” entry. This means that the include file for a normal (non-variant) content must contain the square brackets of the array, Example:

“name”: “RevPiLED”,
“type”: “BYTE”,
“offset”: 1,

And in case of a variant definition, it must look like this:

“variants”: [
“id”: “001”,
“isDefault”: true,