node-red-contrib-my-tools 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.txt +69 -0
  2. package/node-red-contrib-mysql-extended-test/mysql-extended.html +443 -0
  3. package/node-red-contrib-mysql-extended-test/mysql-extended.js +355 -0
  4. package/node-red-contrib-rfid-helper/rfid-lazy.html +153 -0
  5. package/node-red-contrib-rfid-helper/rfid-lazy.js +361 -0
  6. package/node-red-contrib-s7-plus/LICENSE +235 -0
  7. package/node-red-contrib-s7-plus/README.md +141 -0
  8. package/node-red-contrib-s7-plus/examples/read-multiple-values-flow.json +346 -0
  9. package/node-red-contrib-s7-plus/examples/read-write-test-flow.json +172 -0
  10. package/node-red-contrib-s7-plus/examples/write-single-values-flow.json +5583 -0
  11. package/node-red-contrib-s7-plus/lib/s7plus/browse/README.md +72 -0
  12. package/node-red-contrib-s7-plus/lib/s7plus/browse/areas.js +36 -0
  13. package/node-red-contrib-s7-plus/lib/s7plus/browse/datatypes.js +91 -0
  14. package/node-red-contrib-s7-plus/lib/s7plus/browse/flat-browser.js +433 -0
  15. package/node-red-contrib-s7-plus/lib/s7plus/browse/index.js +22 -0
  16. package/node-red-contrib-s7-plus/lib/s7plus/browse/lazy.js +397 -0
  17. package/node-red-contrib-s7-plus/lib/s7plus/browse/node-id.js +22 -0
  18. package/node-red-contrib-s7-plus/lib/s7plus/browse/resolve-symbolic.js +181 -0
  19. package/node-red-contrib-s7-plus/lib/s7plus/browse/vte-helpers.js +49 -0
  20. package/node-red-contrib-s7-plus/lib/s7plus/buffer-stream.js +96 -0
  21. package/node-red-contrib-s7-plus/lib/s7plus/client.js +1238 -0
  22. package/node-red-contrib-s7-plus/lib/s7plus/constants.js +155 -0
  23. package/node-red-contrib-s7-plus/lib/s7plus/crc/index.js +3 -0
  24. package/node-red-contrib-s7-plus/lib/s7plus/crc/s7-crc32.js +70 -0
  25. package/node-red-contrib-s7-plus/lib/s7plus/crc/symbol-crc.js +271 -0
  26. package/node-red-contrib-s7-plus/lib/s7plus/debug.js +88 -0
  27. package/node-red-contrib-s7-plus/lib/s7plus/explore-result.js +41 -0
  28. package/node-red-contrib-s7-plus/lib/s7plus/item-address.js +55 -0
  29. package/node-red-contrib-s7-plus/lib/s7plus/pdu-explore.js +77 -0
  30. package/node-red-contrib-s7-plus/lib/s7plus/pdu-messages.js +359 -0
  31. package/node-red-contrib-s7-plus/lib/s7plus/pobject.js +197 -0
  32. package/node-red-contrib-s7-plus/lib/s7plus/pvalue-codec.js +435 -0
  33. package/node-red-contrib-s7-plus/lib/s7plus/pvalue.js +653 -0
  34. package/node-red-contrib-s7-plus/lib/s7plus/pvar-lists.js +336 -0
  35. package/node-red-contrib-s7-plus/lib/s7plus/read-result.js +91 -0
  36. package/node-red-contrib-s7-plus/lib/s7plus/s7p.js +266 -0
  37. package/node-red-contrib-s7-plus/lib/s7plus/tag-routing.js +30 -0
  38. package/node-red-contrib-s7-plus/lib/s7plus/transport/cotp-stream.js +335 -0
  39. package/node-red-contrib-s7-plus/lib/s7plus/transport/s7-transport.js +335 -0
  40. package/node-red-contrib-s7-plus/nodes/icons/s7complus.png +0 -0
  41. package/node-red-contrib-s7-plus/nodes/icons/s7complus.svg +17 -0
  42. package/node-red-contrib-s7-plus/nodes/s7complus-endpoint.js +825 -0
  43. package/node-red-contrib-s7-plus/nodes/s7complus-explore.js +91 -0
  44. package/node-red-contrib-s7-plus/nodes/s7complus-in.js +255 -0
  45. package/node-red-contrib-s7-plus/nodes/s7complus-out.js +182 -0
  46. package/node-red-contrib-s7-plus/nodes/s7complus.html +1541 -0
  47. package/node-red-contrib-s7-plus/nodes/s7complus.js +10 -0
  48. package/node-red-contrib-s7-plus/package.json +50 -0
  49. package/node-red-contrib-s7-plus/plc/s7-1500/DB_Arrays.db +17 -0
  50. package/node-red-contrib-s7-plus/plc/s7-1500/DB_Binary.db +16 -0
  51. package/node-red-contrib-s7-plus/plc/s7-1500/DB_BitStrings.db +36 -0
  52. package/node-red-contrib-s7-plus/plc/s7-1500/DB_CharacterStrings.db +42 -0
  53. package/node-red-contrib-s7-plus/plc/s7-1500/DB_DateAndTime.db +70 -0
  54. package/node-red-contrib-s7-plus/plc/s7-1500/DB_FloatingPoint.db +42 -0
  55. package/node-red-contrib-s7-plus/plc/s7-1500/DB_Integers.db +72 -0
  56. package/node-red-contrib-s7-plus/plc/s7-1500/DB_Timers.db +40 -0
  57. package/node-red-contrib-s7-plus/scripts/example-flow-shared.js +39 -0
  58. package/node-red-contrib-s7-plus/scripts/generate-read-multiple-flow.js +331 -0
  59. package/node-red-contrib-s7-plus/scripts/generate-rw-test-flow.js +690 -0
  60. package/node-red-contrib-s7-plus/scripts/generate-write-flow.js +476 -0
  61. package/node-red-contrib-s7-plus/scripts/layout-write-flow.js +156 -0
  62. package/node-red-contrib-s7-plus/scripts/run-tests.js +16 -0
  63. package/node-red-flowgobal-change/variable-change.html +425 -0
  64. package/node-red-flowgobal-change/variable-change.js +92 -0
  65. package/node-red-ui_media_viewer/ui_media_viewer.html +87 -0
  66. package/node-red-ui_media_viewer/ui_media_viewer.js +136 -0
  67. package/package.json +12 -0
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ module.exports = function (RED) {
4
+ require('./s7complus-endpoint')(RED);
5
+ require('./s7complus-in')(RED);
6
+ require('./s7complus-out')(RED);
7
+ require('./s7complus-explore')(RED);
8
+ };
9
+
10
+ module.exports.nodeType = 's7complus';
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "node-red-contrib-s7-plus",
3
+ "version": "0.1.1",
4
+ "description": "Node-RED nodes for Siemens S7-1200/1500 via S7CommPlus (symbolic access)",
5
+ "main": "nodes/s7complus.js",
6
+ "files": [
7
+ "nodes/",
8
+ "lib/",
9
+ "examples/",
10
+ "plc/",
11
+ "scripts/"
12
+ ],
13
+ "scripts": {
14
+ "test": "node scripts/run-tests.js"
15
+ },
16
+ "keywords": [
17
+ "node-red",
18
+ "siemens",
19
+ "s7",
20
+ "s7commplus",
21
+ "plc",
22
+ "profinet"
23
+ ],
24
+ "author": {
25
+ "name": "DataLogXE",
26
+ "email": "datalogxe@gmail.com",
27
+ "url": "https://github.com/DataLogXE"
28
+ },
29
+ "license": "LGPL-3.0-or-later",
30
+ "engines": {
31
+ "node": ">=20"
32
+ },
33
+ "peerDependencies": {
34
+ "node-red": ">=3.0.0"
35
+ },
36
+ "node-red": {
37
+ "version": ">=3.0.0",
38
+ "nodes": {
39
+ "s7complus": "nodes/s7complus.js"
40
+ }
41
+ },
42
+ "homepage": "https://github.com/DataLogXE/node-red-contrib-s7-plus#readme",
43
+ "bugs": {
44
+ "url": "https://github.com/DataLogXE/node-red-contrib-s7-plus/issues"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/DataLogXE/node-red-contrib-s7-plus.git"
49
+ }
50
+ }
@@ -0,0 +1,17 @@
1
+ DATA_BLOCK "DB_Arrays"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ SInt_array1000 : Array[1..1000] of SInt; // SInt: Array with 10000 items
7
+ Int_array1000 : Array[1..1000] of Int; // Int: Array with 10000 items
8
+ DInt_array1000 : Array[1..1000] of DInt; // DInt: Array with 10000 items
9
+ Real_array1000 : Array[1..1000] of Real; // Real: Array with 10000 items
10
+ LReal_array1000 : Array[1..1000] of LReal; // LReal: Array with 10000 items
11
+ END_VAR
12
+
13
+
14
+ BEGIN
15
+
16
+ END_DATA_BLOCK
17
+
@@ -0,0 +1,16 @@
1
+ DATA_BLOCK "DB_Binary"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Bool_False : Bool; // Bool: False
7
+ Bool_True : Bool; // Bool: True
8
+ Bool_write : Bool; // Write test
9
+ END_VAR
10
+
11
+
12
+ BEGIN
13
+ Bool_True := TRUE;
14
+
15
+ END_DATA_BLOCK
16
+
@@ -0,0 +1,36 @@
1
+ DATA_BLOCK "DB_BitStrings"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Byte_Min_0x00 : Byte; // Byte: Min
7
+ Byte_Max_0xFF : Byte; // Byte: Max
8
+ Byte_0xAB : Byte; // Byte: Testvalue 1
9
+ Byte_write : Byte; // Write test
10
+ Word_Min_0x0000 : Word; // Word: Min
11
+ Word_Max_0xFFFF : Word; // Word: Max
12
+ Word_0xCAFE : Word; // Word: Testvalue 1
13
+ Word_write : Word; // Write test
14
+ DWord_Min_0x00000000 : DWord; // DWord: Min
15
+ DWord_Max_0xFFFFFFFF : DWord; // DWord: Max
16
+ DWord_0xCAFEBABE : DWord; // DWord: Testvalue 1
17
+ DWord_write : DWord; // Write test
18
+ LWord_Min_0x0000000000000000 : LWord; // LWord: Min
19
+ LWord_Max_0xFFFFFFFFFFFFFFFF : LWord; // LWord: Max
20
+ LWord_0x12345678ABCDEFAB : LWord; // LWord: Testvalue 1
21
+ LWord_write : LWord; // Write test
22
+ END_VAR
23
+
24
+
25
+ BEGIN
26
+ Byte_Max_0xFF := 16#00FF;
27
+ Byte_0xAB := 16#00AB;
28
+ Word_Max_0xFFFF := 16#FFFF;
29
+ Word_0xCAFE := 16#CAFE;
30
+ DWord_Max_0xFFFFFFFF := 16#FFFF_FFFF;
31
+ DWord_0xCAFEBABE := 16#CAFE_BABE;
32
+ LWord_Max_0xFFFFFFFFFFFFFFFF := 16#FFFF_FFFF_FFFF_FFFF;
33
+ LWord_0x12345678ABCDEFAB := 16#1234_5678_ABCD_EFAB;
34
+
35
+ END_DATA_BLOCK
36
+
@@ -0,0 +1,42 @@
1
+ DATA_BLOCK "DB_CharacterStrings"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Char_Space : Char; // Char: Space
7
+ Char_A : Char; // Char: Capital A
8
+ Char_auml : Char; // Char: Lowercase german a Umlaut
9
+ Char_write : Char; // Write test
10
+ String_Empty : String; // String: Empty
11
+ String_Hello_World : String; // String: "Hello World"
12
+ String_Moumltoumlrhead : String; // String: "Mötörhead"
13
+ String_Len4_Test : String[4]; // String: Fix len[4] "Test"
14
+ String_write : String; // Write test
15
+ WChar_Space : WChar; // WChar: Space
16
+ WChar_auml : WChar; // WChar: Lowercase german a Umlaut
17
+ WChar_X : WChar; // WChar: Capital X
18
+ WChar_GreekSigmaBig : WChar; // WChar: Greek capital Sigma
19
+ WChar_write : WChar; // Write test
20
+ WString_Empty : WString; // WString: Empty
21
+ WString_Moumltoumlrhead : WString; // WString: "Mötörhead"
22
+ WString_Greek1 : WString; // WString: String with greek chars
23
+ WString_Len4_Test : WString[4]; // WString: Fix len[4] "Test"
24
+ WString_write : WString; // Write test
25
+ END_VAR
26
+
27
+
28
+ BEGIN
29
+ Char_A := 'A';
30
+ Char_auml := 'ä';
31
+ String_Hello_World := 'Hello World';
32
+ String_Moumltoumlrhead := 'Mötörhead';
33
+ String_Len4_Test := 'Test';
34
+ WChar_auml := WCHAR#'ä';
35
+ WChar_X := WCHAR#'X';
36
+ WChar_GreekSigmaBig := WCHAR#'Ʃ';
37
+ WString_Moumltoumlrhead := WSTRING#'Mötörhead';
38
+ WString_Greek1 := WSTRING#'Test Greek ΣΛΔ end.';
39
+ WString_Len4_Test := WSTRING#'Test';
40
+
41
+ END_DATA_BLOCK
42
+
@@ -0,0 +1,70 @@
1
+ DATA_BLOCK "DB_DateAndTime"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Date_Min_1990_01_01 : Date; // Date: Min
7
+ Date_Max_2169_06_06 : Date; // Date: Max
8
+ Date_2023_10_28 : Date; // Date: Testvalue 1
9
+ Date_1990_02_03 : Date; // Date: Testvalue 2
10
+ Date_write : Date; // Write test
11
+ Time_Of_Day_Min_00_00_00d000 : Time_Of_Day; // Time_Of_Day: Min
12
+ Time_Of_Day_Max_23_59_59d999 : Time_Of_Day; // Time_Of_Day: Min
13
+ Time_Of_Day_01_02_03 : Time_Of_Day; // Time_Of_Day: Testvalue 1
14
+ Time_Of_Day_23_58_59 : Time_Of_Day; // Time_Of_Day: Testvalue 2
15
+ Time_Of_Day_12_13_14d123 : Time_Of_Day; // Time_Of_Day: Testvalue 3
16
+ Time_Of_Day_write : Time_Of_Day; // Write test
17
+ Date_And_Time_Min_1990_01_01_00_00_00 : Date_And_Time; // Date_And_Time: Min
18
+ Date_And_Time_Max_2089_12_31_23_59_59d999 : Date_And_Time; // Date_And_Time: Max
19
+ Date_And_Time_2023_10_28_23_58_59d123 : Date_And_Time; // Date_And_Time: Testvalue 1
20
+ Date_And_Time_write : Date_And_Time; // Write test
21
+ LTOD_Min_00_00_00d000000000 : LTime_Of_Day; // LTOD: Min
22
+ LTOD_Max_23_59_59d999999999 : LTime_Of_Day; // LTOD: Max
23
+ LTOD_10_20_30d400365215 : LTime_Of_Day; // LTOD: Testvalue 1
24
+ LTOD_write : LTime_Of_Day; // Write test
25
+ LDT_Min_1970_01_01_00_00_00d000000000 : LDT; // LDT: Min
26
+ LDT_Max_2262_04_11_23_47_16d854775807 : LDT; // LDT: Max
27
+ LDT_2008_10_25_08_12_34d567 : LDT; // LDT: Testvalue 1
28
+ LDT_write : LDT; // Write test
29
+ DTL_Min_1970_01_01_00_00_00d000000000 {InstructionName := 'DTL'; LibVersion := '1.0'} : DTL; // DTL: Min
30
+ DTL_Max_2262_04_11_23_47_16d854775807 {InstructionName := 'DTL'; LibVersion := '1.0'} : DTL; // DTL: Max
31
+ DTL_2008_10_25_08_12_34d567 {InstructionName := 'DTL'; LibVersion := '1.0'} : DTL; // DTL: Testvalue 1
32
+ DTL_write {InstructionName := 'DTL'; LibVersion := '1.0'} : DTL; // Write test
33
+ END_VAR
34
+
35
+
36
+ BEGIN
37
+ Date_Max_2169_06_06 := D#2169-06-06;
38
+ Date_2023_10_28 := D#2023-10-28;
39
+ Date_1990_02_03 := D#1990-02-03;
40
+ Time_Of_Day_Max_23_59_59d999 := TOD#23:59:59.999;
41
+ Time_Of_Day_01_02_03 := TOD#01:02:03;
42
+ Time_Of_Day_23_58_59 := TOD#23:58:59;
43
+ Time_Of_Day_12_13_14d123 := TOD#12:13:14.123;
44
+ Date_And_Time_Max_2089_12_31_23_59_59d999 := DT#2089-12-31-23:59:59.999;
45
+ Date_And_Time_2023_10_28_23_58_59d123 := DT#2023-10-28-23:58:59.123;
46
+ LTOD_Max_23_59_59d999999999 := LTOD#23:59:59.999999999;
47
+ LTOD_10_20_30d400365215 := LTOD#10:20:30.400365215;
48
+ LDT_Max_2262_04_11_23_47_16d854775807 := LDT#2262-04-11-23:47:16.854775807;
49
+ LDT_2008_10_25_08_12_34d567 := LDT#2008-10-25-08:12:34.567;
50
+ DTL_Max_2262_04_11_23_47_16d854775807.YEAR := 2262;
51
+ DTL_Max_2262_04_11_23_47_16d854775807.MONTH := 4;
52
+ DTL_Max_2262_04_11_23_47_16d854775807.DAY := 11;
53
+ DTL_Max_2262_04_11_23_47_16d854775807.WEEKDAY := 6;
54
+ DTL_Max_2262_04_11_23_47_16d854775807.HOUR := 23;
55
+ DTL_Max_2262_04_11_23_47_16d854775807.MINUTE := 47;
56
+ DTL_Max_2262_04_11_23_47_16d854775807.SECOND := 16;
57
+ DTL_Max_2262_04_11_23_47_16d854775807.NANOSECOND := 854775807;
58
+ DTL_Max_2262_04_11_23_47_16d854775807 := DTL#2262-04-11-23:47:16.854775807;
59
+ DTL_2008_10_25_08_12_34d567.YEAR := 2008;
60
+ DTL_2008_10_25_08_12_34d567.MONTH := 10;
61
+ DTL_2008_10_25_08_12_34d567.DAY := 25;
62
+ DTL_2008_10_25_08_12_34d567.WEEKDAY := 7;
63
+ DTL_2008_10_25_08_12_34d567.HOUR := 8;
64
+ DTL_2008_10_25_08_12_34d567.MINUTE := 12;
65
+ DTL_2008_10_25_08_12_34d567.SECOND := 34;
66
+ DTL_2008_10_25_08_12_34d567.NANOSECOND := 567000000;
67
+ DTL_2008_10_25_08_12_34d567 := DTL#2008-10-25-08:12:34.567;
68
+
69
+ END_DATA_BLOCK
70
+
@@ -0,0 +1,42 @@
1
+ DATA_BLOCK "DB_FloatingPoint"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Real_MinNeg_n3d402823e38 : Real; // Real: Min negative value
7
+ Real_MaxNeg_n1d175495en38 : Real; // Real: Max negative value
8
+ Real_MinPos_1d175495en38 : Real; // Real: Min positive value
9
+ Real_MaxPos_3d402823e38 : Real; // Real: Max positive value
10
+ Real_0d0 : Real; // Real: Zero
11
+ Real_987d125 : Real; // Real: Testvalue 1
12
+ Real_n123d5 : Real; // Real: Testvalue 2
13
+ Real_write : Real; // Write test
14
+ LReal_MinNeg_n1d7976931348623157e308 : LReal; // LReal: Min negative value
15
+ LReal_MaxNeg_n2d2250738585072014en308 : LReal; // LReal: Max negative value
16
+ LReal_MinPos_2d2250738585072014en308 : LReal; // LReal: Min positive value
17
+ LReal_MaxPos_1d7976931348623157e308 : LReal; // LReal: Max positive value
18
+ LReal_0d0 : LReal; // LReal: Zero
19
+ LReal_987d125 : LReal; // LReal: Testvalue 1
20
+ LReal_n123d5 : LReal; // LReal: Testvalue 2
21
+ LReal_1d23456789012346e18 : LReal; // LReal: Testvalue 3
22
+ LReal_write : LReal; // Write test
23
+ END_VAR
24
+
25
+
26
+ BEGIN
27
+ Real_MinNeg_n3d402823e38 := -3.402823E+38;
28
+ Real_MaxNeg_n1d175495en38 := -1.175495E-38;
29
+ Real_MinPos_1d175495en38 := 1.175495E-38;
30
+ Real_MaxPos_3d402823e38 := 3.402823E+38;
31
+ Real_987d125 := 987.125;
32
+ Real_n123d5 := -123.5;
33
+ LReal_MinNeg_n1d7976931348623157e308 := -1.7976931348623157E+308;
34
+ LReal_MaxNeg_n2d2250738585072014en308 := -2.2250738585072014E-308;
35
+ LReal_MinPos_2d2250738585072014en308 := 2.2250738585072014E-308;
36
+ LReal_MaxPos_1d7976931348623157e308 := 1.7976931348623157E+308;
37
+ LReal_987d125 := 987.125;
38
+ LReal_n123d5 := -123.5;
39
+ LReal_1d23456789012346e18 := 1.23456789012346E+18;
40
+
41
+ END_DATA_BLOCK
42
+
@@ -0,0 +1,72 @@
1
+ DATA_BLOCK "DB_Integers"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Int_Min_n32768 : Int; // Int: Min
7
+ Int_Max_32767 : Int; // Int: Max
8
+ Int_12345 : Int; // Int: Testvalue 1
9
+ Int_n9876 : Int; // Int: Testvalue 2
10
+ Int_write : Int; // Write test
11
+ ULInt_Min_0 : ULInt; // ULInt: Min
12
+ ULInt_Max_18446744073709551615 : ULInt; // ULInt: Max
13
+ ULInt_12345678901234567890 : ULInt; // ULInt: Testvalue 1
14
+ ULInt_write : ULInt; // Write test
15
+ LInt_Min_n9223372036854775808 : LInt; // LInt: Min
16
+ LInt_Max_9223372036854775807 : LInt; // LInt: Max
17
+ LInt_1234567890123456789 : LInt; // LInt: Testvalue 1
18
+ LInt_n987654321098765432 : LInt; // LInt: Testvalue 2
19
+ LInt_write : LInt; // Write test
20
+ USint_Min_0 : USInt; // USInt: Min
21
+ USInt_Max_255 : USInt; // USInt: Max
22
+ USInt_123 : USInt; // USInt: Testvalue 1
23
+ USInt_write : USInt; // Write test
24
+ UInt_Min_0 : UInt; // UInt: Min
25
+ UInt_Max_65535 : UInt; // UInt: Max
26
+ UInt_12345 : UInt; // UInt: Testvalue 1
27
+ UInt_write : UInt; // Write test
28
+ UDInt_Min_0 : UDInt; // UDInt: Min
29
+ UDInt_Max_4294967295 : UDInt; // UDInt: Max
30
+ UDint_1234567890 : UDInt; // UDInt: Testvalue 1
31
+ UDInt_write : UDInt; // Write test
32
+ SInt_Min_n128 : SInt; // SInt: Min
33
+ SInt_Max_127 : SInt; // SInt: Max
34
+ SInt_123 : SInt; // SInt: Testvalue 1
35
+ SInt_n123 : SInt; // SInt: Testvalue 2
36
+ SInt_write : SInt; // Write test
37
+ DInt_Min_n2147483648 : DInt; // DInt: Min
38
+ DInt_Max_2147483647 : DInt; // DInt: Max
39
+ DInt_1234567890 : DInt; // DInt: Testvalue 1
40
+ DInt_n987654321 : DInt; // DInt: Testvalue 2
41
+ DInt_write : DInt; // Write test
42
+ END_VAR
43
+
44
+
45
+ BEGIN
46
+ Int_Min_n32768 := -32768;
47
+ Int_Max_32767 := 32767;
48
+ Int_12345 := 12345;
49
+ Int_n9876 := -9876;
50
+ ULInt_Max_18446744073709551615 := 18_446_744_073_709_551_615;
51
+ ULInt_12345678901234567890 := 12_345_678_901_234_567_890;
52
+ LInt_Min_n9223372036854775808 := -9_223_372_036_854_775_808;
53
+ LInt_Max_9223372036854775807 := 9_223_372_036_854_775_807;
54
+ LInt_1234567890123456789 := 1_234_567_890_123_456_789;
55
+ LInt_n987654321098765432 := -987_654_321_098_765_432;
56
+ USInt_Max_255 := 255;
57
+ USInt_123 := 123;
58
+ UInt_Max_65535 := 65535;
59
+ UInt_12345 := 12345;
60
+ UDInt_Max_4294967295 := 4_294_967_295;
61
+ UDint_1234567890 := 1_234_567_890;
62
+ SInt_Min_n128 := -128;
63
+ SInt_Max_127 := 127;
64
+ SInt_123 := 123;
65
+ SInt_n123 := -123;
66
+ DInt_Min_n2147483648 := -2_147_483_648;
67
+ DInt_Max_2147483647 := 2_147_483_647;
68
+ DInt_1234567890 := 1_234_567_890;
69
+ DInt_n987654321 := -987_654_321;
70
+
71
+ END_DATA_BLOCK
72
+
@@ -0,0 +1,40 @@
1
+ DATA_BLOCK "DB_Timers"
2
+ { S7_Optimized_Access := 'TRUE' }
3
+ VERSION : 0.1
4
+ NON_RETAIN
5
+ VAR
6
+ Time_Min_n24D_20H_31M_23S_648MS : Time; // Time: Min
7
+ Time_Max_24D_20H_31M_23S_647MS : Time; // Time: Max
8
+ Time_12S_345MS : Time; // Time: Testvalue 1
9
+ Time_n20M_34S : Time; // Time: Testvalue 2
10
+ Time_write : Time; // Write test
11
+ S5Time_Min_0MS : S5Time; // S5Time: Min
12
+ S5Time_Max_2H46M30S : S5Time; // S5Time: Max
13
+ S5Time_120MS : S5Time; // S5Time: Testvalue 1
14
+ S5Time_12S300MS : S5Time; // S5Time: Testvalue 2
15
+ S5Time_write : S5Time; // Write test
16
+ LTime_Min_n106751D_23H_47M_16S_854MS_775US_808NS : LTime; // LTime: Min
17
+ LTime_Max_106751D_23H_47M_16S_854MS_775US_807NS : LTime; // LTime: Max
18
+ LTime_12S345NS : LTime; // LTime: Testvalue 1
19
+ LTime_n12H_345US : LTime; // LTime: Testvalue 2
20
+ LTime_23H_456US : LTime; // LTime: Testvalue 3
21
+ LTime_write : LTime; // Write test
22
+ END_VAR
23
+
24
+
25
+ BEGIN
26
+ Time_Min_n24D_20H_31M_23S_648MS := T#-24D_20H_31M_23S_648MS;
27
+ Time_Max_24D_20H_31M_23S_647MS := T#24D_20H_31M_23S_647MS;
28
+ Time_12S_345MS := T#12S_345MS;
29
+ Time_n20M_34S := T#-20M_34S;
30
+ S5Time_Max_2H46M30S := S5T#2H_46M_30S;
31
+ S5Time_120MS := S5T#120MS;
32
+ S5Time_12S300MS := S5T#12S_300MS;
33
+ LTime_Min_n106751D_23H_47M_16S_854MS_775US_808NS := LT#-106751D_23H_47M_16S_854MS_775US_808NS;
34
+ LTime_Max_106751D_23H_47M_16S_854MS_775US_807NS := LT#106751D_23H_47M_16S_854MS_775US_807NS;
35
+ LTime_12S345NS := LT#12S_345NS;
36
+ LTime_n12H_345US := LT#-12H_345US;
37
+ LTime_23H_456US := LT#23H_456US;
38
+
39
+ END_DATA_BLOCK
40
+
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ // Shared PLC endpoint and global-config ids for all example flows.
4
+ // Using the same node ids lets Node-RED reuse one config node when multiple
5
+ // example flows are imported into the same workspace.
6
+ const EP = 'example_plc_ep';
7
+ const GLOBAL_CONFIG_ID = '69768f9f5a51add5';
8
+ const PLC_ADDRESS = '192.168.0.1';
9
+ const PLC_TIMEOUT = 10000;
10
+ const DEFAULT_OUTPUT_FORMAT = 'object';
11
+
12
+ function endpointNode() {
13
+ return {
14
+ id: EP,
15
+ type: 's7-plus endpoint',
16
+ name: 'PLC',
17
+ address: PLC_ADDRESS,
18
+ timeout: PLC_TIMEOUT
19
+ };
20
+ }
21
+
22
+ function globalConfigNode(packageVersion) {
23
+ return {
24
+ id: GLOBAL_CONFIG_ID,
25
+ type: 'global-config',
26
+ env: [],
27
+ modules: {
28
+ 'node-red-contrib-s7-plus': packageVersion
29
+ }
30
+ };
31
+ }
32
+
33
+ module.exports = {
34
+ EP,
35
+ GLOBAL_CONFIG_ID,
36
+ DEFAULT_OUTPUT_FORMAT,
37
+ endpointNode,
38
+ globalConfigNode
39
+ };