Vielen Dank für eure Antworten.
Hier exemplarisch das DIO Modul (RevPiDIO_20160818_1_0.rap). Wie Volker gesagt hat, ist es nicht ganz trivial, aber bei vielen Zeilen kann man sich denken, wozu die gut sind.
Code: Select all
{
"id": "piDIO",
"version": "1.0",
"comment": [
"",
"",
""
],
"size": "1",
"devicetype": "LEFT_RIGHT",
"producttype": 96,
"input": {
"variants": [
{
"id": "001",
"isDefault": true,
"data": [
{
"name": "I",
"type": "BOOL",
"offset": 0,
"range": {
"type": "tooltip_loop",
"values": [0,1,1]
},
"default": "0",
"unit": "",
"tags": "input, bool, test",
"edit": "2",
"order": 1,
"multi": 16,
"export": true
},
{
"name": "Output Status",
"type": "WORD",
"offset": 2,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "input, word, test",
"edit": "2",
"order": 2,
"export": false
},
{
"name": "Status",
"type": "WORD",
"offset": 4,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "input, word, test",
"edit": "2",
"order": 3,
"export": false
},
{
"name": "Counter",
"type": "DINT",
"offset": 6,
"range": {
"type": "tooltip_loop",
"values": [0,4294967295,1]
},
"default": "0",
"unit": "",
"tags": "input, dint",
"edit": "2",
"multi": 16,
"order": 4,
"export": false
}
]
},
{
"id": "002",
"isDefault": false,
"data": [
{
"name": "Input",
"type": "WORD",
"offset": 0,
"range": {
"type": "tooltip_loop",
"values": [0,16383,1]
},
"default": "0",
"unit": "",
"tags": "input, word, test",
"edit": "2",
"order": 1,
"export": true
},
{
"name": "Output Status",
"type": "WORD",
"offset": 2,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "input, word, test",
"edit": "2",
"order": 2,
"export": false
},
{
"name": "Status",
"type": "WORD",
"offset": 4,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "input, word, test",
"edit": "2",
"order": 3,
"export": false
},
{
"name": "Counter",
"type": "DINT",
"offset": 6,
"range": {
"type": "tooltip_loop",
"values": [0,4294967295,1]
},
"default": "0",
"unit": "",
"tags": "input, dint",
"edit": "2",
"multi": 16,
"order": 4,
"export": false
}
]
}
]
},
"output": {
"variants": [
{
"id": "001",
"isDefault": true,
"data": [
{
"name": "O",
"type": "BOOL",
"offset": 70,
"range": {
"type": "tooltip_loop",
"values": [0,1,1]
},
"default": "0",
"unit": "",
"tags": "output, bool",
"edit": "3",
"order": 10,
"multi": 16,
"export": true
},
{
"name": "PWM",
"type": "USINT",
"offset": 72,
"range": {
"type": "tooltip_loop",
"values": [0,100,1]
},
"default": "0",
"unit": "",
"tags": "output, byte",
"edit": "3",
"order": 11,
"multi": 16,
"export": false
}
]
},
{
"id": "002",
"isDefault": false,
"data": [
{
"name": "Output",
"type": "WORD",
"offset": 70,
"range": {
"type": "tooltip_loop",
"values": [0,16383,1]
},
"default": "0",
"unit": "",
"tags": "output, word",
"edit": "3",
"order": 10,
"export": true
},
{
"name": "PWM",
"type": "USINT",
"offset": 72,
"range": {
"type": "tooltip_loop",
"values": [0,100,1]
},
"default": "0",
"unit": "",
"tags": "output, byte",
"edit": "3",
"order": 11,
"multi": 16,
"export": false
}
]
}
]
},
"memory": [
{
"name": "InputMode",
"type": "BYTE",
"offset": 88,
"maxsize": 0,
"range": {
"type": "list",
"values": [
"Direct|0",
"Counter, rising edge|1",
"Counter, falling edge|2",
"Encoder|3"
]
},
"default": "0",
"unit": "",
"tags": "memory, byte",
"edit": "3",
"order": 20,
"multi": 16,
"export": false
},
{
"name": "InputDebounce",
"type": "WORD",
"offset": 104,
"maxsize": 0,
"range": {
"type": "list",
"values": [
"Off|0",
"25us|1",
"750us|2",
"3ms|3"
]
},
"default": "0",
"unit": "",
"tags": "memory, word",
"edit": "3",
"order": 21,
"export": false
},
{
"name": "OutputPushPull",
"type": "WORD",
"offset": 106,
"maxsize": 0,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "memory, word",
"edit": "3",
"order": 25,
"export": false
},
{
"name": "OutputOpenLoadDetect",
"type": "WORD",
"offset": 108,
"maxsize": 0,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "memory, word",
"edit": "3",
"order": 26,
"export": false
},
{
"name": "OutputPWMActive",
"type": "WORD",
"offset": 110,
"maxsize": 0,
"range": {
"type": "tooltip_loop",
"values": [0,65535,1]
},
"default": "0",
"unit": "",
"tags": "memory, word",
"edit": "3",
"order": 27,
"export": false
},
{
"name": "OutputPWMFrequency",
"type": "BYTE",
"offset": 112,
"maxsize": 0,
"range": {
"type": "list",
"values": [
"40Hz 1%|1",
"80Hz 2%|2",
"160Hz 4%|4",
"200Hz 5%|5",
"400Hz 10%|10"
]
},
"default": "1",
"unit": "",
"tags": "memory, byte",
"edit": "3",
"order": 28,
"export": false
}
],
"lang": {
"de": {
"INPUT": "Eingang",
"OUTPUT": "Ausgang"
},
"en": {
"INPUT": "Input",
"OUTPUT": "Output"
}
}
}