From 081c466e06d129d720408116675b517852843b3a Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:35:27 +1000 Subject: [PATCH 01/24] Add read_attributes CLI command; fix ADS symbol binary parser - cmd/main.go: replace hardcoded constants with env vars + CLI flags (ADS_TARGET_NET_ID, ADS_ROUTER_HOST, ADS_ROUTER_PORT, ADS_TIMEOUT) - cmd/cli/cmd_attributes.go: new read_attributes command showing type, value, symbol/type-level pragma attributes and sub-item tree - cmd/cli/cmd_read.go: fix list_symbols - replace broken raw parse with client.UploadSymbols(); add list_data_types command - cmd/cli/commandline.go: add tab completion for new commands - cmd/cli/handlers.go: register new command handlers - cmd/cli/cmd_util.go: add help text for new commands - pkg/ads/ads-symbol/parse.go: fix binary parser bugs - comment is null-terminated (was reading commentLen, not commentLen+1) - parse array info entries into ArrayInfo []ArrayInfoEntry - parse TypeGuid (16 bytes) into TypeGUID string when flag set - use ADSSymbolFlagAttributes constant instead of magic 0x1000 - pkg/ads/ads-symbol/types.go: add ArrayInfoEntry struct; add ArrayInfo and TypeGUID fields to AdsSymbol - pkg/ads/ads-symbol/parse_test.go: fix buildSymbolData helper (comment null terminator); add attribute, TypeGuid and array info test cases - pkg/ads/client_symbols.go: add UploadSymbols and GetDataTypes helpers --- cmd/cli/cmd_attributes.go | 94 +++++++++++++++ cmd/cli/cmd_control.go | 44 +++---- cmd/cli/cmd_read.go | 87 +++----------- cmd/cli/cmd_subscriptions.go | 18 +-- cmd/cli/cmd_util.go | 1 + cmd/cli/cmd_write.go | 24 ++-- cmd/cli/commandline.go | 33 +++--- cmd/cli/handlers.go | 11 +- cmd/main.go | 46 +++++++- pkg/ads/ads-symbol/parse.go | 68 +++++++++-- pkg/ads/ads-symbol/parse_test.go | 190 ++++++++++++++++++++++++++++++- pkg/ads/ads-symbol/types.go | 16 +++ pkg/ads/client_symbols.go | 51 +++++++++ 13 files changed, 533 insertions(+), 150 deletions(-) create mode 100644 cmd/cli/cmd_attributes.go diff --git a/cmd/cli/cmd_attributes.go b/cmd/cli/cmd_attributes.go new file mode 100644 index 0000000..bc1683e --- /dev/null +++ b/cmd/cli/cmd_attributes.go @@ -0,0 +1,94 @@ +package cli + +import ( + "fmt" + + "github.com/jarmocluyse/ads-go/pkg/ads" + "github.com/jarmocluyse/ads-go/pkg/ads/types" +) + +// handleReadAttributes reads a symbol's type info, pragma attribute declarations, and current value. +// Usage: read_attributes [symbol_path] [port] +func handleReadAttributes(args []string, client *ads.Client) { + if len(args) == 0 { + fmt.Println("[ERROR] read_attributes: symbol path required") + fmt.Println(" Usage: read_attributes [port]") + fmt.Println(" Tip: use list_symbols to discover available symbol paths") + return + } + + path := args[0] + var port uint16 = 852 + + if len(args) > 1 { + fmt.Sscanf(args[1], "%d", &port) + } + + sym, err := client.GetSymbol(port, path) + if err != nil { + fmt.Printf("[ERROR] read_attributes: failed to get symbol '%s': %v\n", path, err) + return + } + + dt, err := client.GetDataType(sym.Type, port) + if err != nil { + fmt.Printf("[ERROR] read_attributes: failed to get data type '%s': %v\n", sym.Type, err) + return + } + + value, err := client.ReadValue(port, path) + if err != nil { + fmt.Printf("[ERROR] read_attributes: failed to read value of '%s': %v\n", path, err) + return + } + + fmt.Printf("\n--- Symbol: %s ---\n", sym.Name) + fmt.Printf(" Type: %s (%s, %d bytes)\n", sym.Type, types.ADSDataTypeToString(dt.DataType), sym.Size) + if sym.Comment != "" { + fmt.Printf(" Comment: %s\n", sym.Comment) + } + fmt.Printf(" Value: %v\n", value) + + fmt.Printf("\n Symbol Attributes (%d):\n", len(sym.Attributes)) + if len(sym.Attributes) == 0 { + fmt.Printf(" (none)\n") + } + for _, attr := range sym.Attributes { + fmt.Printf(" %-30s = %q\n", attr.Name, attr.Value) + } + + fmt.Printf("\n Type-level Attributes (%d):\n", len(dt.Attributes)) + if len(dt.Attributes) == 0 { + fmt.Printf(" (none)\n") + } + for _, attr := range dt.Attributes { + fmt.Printf(" %-30s = %q\n", attr.Name, attr.Value) + } + + if len(dt.SubItems) > 0 { + fmt.Printf("\n Sub-items (%d):\n", len(dt.SubItems)) + printAttrSubItems(dt.SubItems, " ") + } + + if len(dt.ArrayInfo) > 0 { + fmt.Printf("\n Array dimensions (%d):\n", len(dt.ArrayInfo)) + for i, ai := range dt.ArrayInfo { + fmt.Printf(" [%d] start=%d length=%d\n", i, ai.StartIndex, ai.Length) + } + } + + fmt.Println() +} + +func printAttrSubItems(items []types.AdsDataType, indent string) { + for _, item := range items { + fmt.Printf("%s%-20s : %-20s (offset %d, %d bytes)\n", + indent, item.Name, item.Type, item.Offset, item.Size) + for _, attr := range item.Attributes { + fmt.Printf("%s {attr} %-28s = %q\n", indent, attr.Name, attr.Value) + } + if len(item.SubItems) > 0 { + printAttrSubItems(item.SubItems, indent+" ") + } + } +} diff --git a/cmd/cli/cmd_control.go b/cmd/cli/cmd_control.go index 71a74ac..a9a8e2a 100644 --- a/cmd/cli/cmd_control.go +++ b/cmd/cli/cmd_control.go @@ -11,7 +11,7 @@ import ( // handleEnableCounter enables or disables the cycle-based integer counter. // Usage: enable_counter func handleEnableCounter(args []string, client *ads.Client) { - data := "GLOBAL.gIntCounterActive" + data := "Global.int_counter_active" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_counter': No value provided. Use 'true' or 'false'.") @@ -42,7 +42,7 @@ func handleEnableCounter(args []string, client *ads.Client) { // handleEnableToggle enables or disables the cycle-based boolean toggle. // Usage: enable_toggle func handleEnableToggle(args []string, client *ads.Client) { - data := "GLOBAL.gBoolToggleActive" + data := "Global.bool_toggle_active" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_toggle': No value provided. Use 'true' or 'false'.") @@ -73,7 +73,7 @@ func handleEnableToggle(args []string, client *ads.Client) { // handleEnableTimedCounter enables or disables the time-based integer counter. // Usage: enable_timed_counter func handleEnableTimedCounter(args []string, client *ads.Client) { - data := "GLOBAL.gTimedCounterActive" + data := "Global.timed_counter_active" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_timed_counter': No value provided. Use 'true' or 'false'.") @@ -104,7 +104,7 @@ func handleEnableTimedCounter(args []string, client *ads.Client) { // handleEnableTimedToggle enables or disables the time-based boolean toggle. // Usage: enable_timed_toggle func handleEnableTimedToggle(args []string, client *ads.Client) { - data := "GLOBAL.gTimedToggleActive" + data := "Global.timed_toggle_active" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_timed_toggle': No value provided. Use 'true' or 'false'.") @@ -139,10 +139,10 @@ func handleReadCounters(args []string, client *ads.Client) { // List of variables to read vars := []string{ - "GLOBAL.gMyIntCounter", - "GLOBAL.gMyBoolToogle", - "GLOBAL.gTimedIntCounter", - "GLOBAL.gTimedBoolToogle", + "Global.int_counter", + "Global.bool_toggle", + "Global.timed_int_counter", + "Global.timed_bool_toggle", } fmt.Println("[INFO] Reading counter and toggle values:") @@ -162,26 +162,26 @@ func handleResetCounters(args []string, client *ads.Client) { var port uint16 = 852 // Reset cycle-based counter - if err := client.WriteValue(port, "GLOBAL.gMyIntCounter", 0); err != nil { - fmt.Printf("[ERROR] Failed to reset gMyIntCounter: %v\n", err) + if err := client.WriteValue(port, "Global.int_counter", 0); err != nil { + fmt.Printf("[ERROR] Failed to reset Global.int_counter: %v\n", err) return } // Reset cycle-based toggle - if err := client.WriteValue(port, "GLOBAL.gMyBoolToogle", false); err != nil { - fmt.Printf("[ERROR] Failed to reset gMyBoolToogle: %v\n", err) + if err := client.WriteValue(port, "Global.bool_toggle", false); err != nil { + fmt.Printf("[ERROR] Failed to reset Global.bool_toggle: %v\n", err) return } // Reset timed counter - if err := client.WriteValue(port, "GLOBAL.gTimedIntCounter", 0); err != nil { - fmt.Printf("[ERROR] Failed to reset gTimedIntCounter: %v\n", err) + if err := client.WriteValue(port, "Global.timed_int_counter", 0); err != nil { + fmt.Printf("[ERROR] Failed to reset Global.timed_int_counter: %v\n", err) return } // Reset timed toggle - if err := client.WriteValue(port, "GLOBAL.gTimedBoolToogle", false); err != nil { - fmt.Printf("[ERROR] Failed to reset gTimedBoolToogle: %v\n", err) + if err := client.WriteValue(port, "Global.timed_bool_toggle", false); err != nil { + fmt.Printf("[ERROR] Failed to reset Global.timed_bool_toggle: %v\n", err) return } @@ -195,10 +195,10 @@ func handleReadStatus(args []string, client *ads.Client) { // List of enable flags to read flags := []string{ - "GLOBAL.gIntCounterActive", - "GLOBAL.gBoolToggleActive", - "GLOBAL.gTimedCounterActive", - "GLOBAL.gTimedToggleActive", + "Global.int_counter_active", + "Global.bool_toggle_active", + "Global.timed_int_counter_active", + "Global.timed_bool_toggle_active", } fmt.Println("[INFO] Reading enable flag status:") @@ -219,7 +219,7 @@ func handleReadStatus(args []string, client *ads.Client) { // handleSetCyclePeriod sets the cycle period for timed operations. // Usage: set_period func handleSetCyclePeriod(args []string, client *ads.Client) { - data := "GLOBAL.gCyclePeriod" + data := "Global.cycle_period" var port uint16 = 852 if len(args) == 0 { @@ -252,7 +252,7 @@ func handleSetCyclePeriod(args []string, client *ads.Client) { // handleReadCyclePeriod reads the current cycle period. // Usage: read_period func handleReadCyclePeriod(args []string, client *ads.Client) { - data := "GLOBAL.gCyclePeriod" + data := "Global.cycle_period" var port uint16 = 852 value, err := client.ReadValue(port, data) diff --git a/cmd/cli/cmd_read.go b/cmd/cli/cmd_read.go index 45eaa6f..07476d4 100644 --- a/cmd/cli/cmd_read.go +++ b/cmd/cli/cmd_read.go @@ -9,7 +9,7 @@ import ( // handleReadValue reads a generic value from the PLC. // Usage: read_value [symbol_path] [port] func handleReadValue(args []string, client *ads.Client) { - data := "GLOBAL.gMyInt" + data := "Global.int_var" var port uint16 = 852 // Parse arguments if provided @@ -31,7 +31,7 @@ func handleReadValue(args []string, client *ads.Client) { // handleReadBool reads a boolean value from the PLC. // Usage: read_bool [symbol_path] [port] func handleReadBool(args []string, client *ads.Client) { - data := "GLOBAL.gMyBool" + data := "Global.bool_var" var port uint16 = 852 // Parse arguments if provided @@ -53,7 +53,7 @@ func handleReadBool(args []string, client *ads.Client) { // handleReadObject reads a structured object from the PLC. // Usage: read_object func handleReadObject(args []string, client *ads.Client) { - data := "GLOBAL.gMyDUT" + data := "Global.test_struct" var port uint16 = 852 value, err := client.ReadValue(port, data) if err != nil { @@ -66,7 +66,7 @@ func handleReadObject(args []string, client *ads.Client) { // handleReadArray reads an array from the PLC. // Usage: read_array func handleReadArray(args []string, client *ads.Client) { - data := "GLOBAL.gIntArray" + data := "Global.int_array" var port uint16 = 852 value, err := client.ReadValue(port, data) if err != nil { @@ -81,83 +81,26 @@ func handleReadArray(args []string, client *ads.Client) { func handleListSymbols(args []string, client *ads.Client) { var port uint16 = 852 - // Parse port if provided if len(args) > 0 { fmt.Sscanf(args[0], "%d", &port) } - // Use ReadRaw to get symbol upload info - data, err := client.ReadRaw(port, 0xF00C, 0, 24) // ADSReservedIndexGroupSymbolUploadInfo2 + symbols, err := client.UploadSymbols(port) if err != nil { - fmt.Printf("[ERROR] Command 'list_symbols': Failed to get symbol info (port %d): %v\n", port, err) + fmt.Printf("[ERROR] list_symbols: failed to upload symbols (port %d): %v\n", port, err) return } - if len(data) < 24 { - fmt.Printf("[ERROR] Command 'list_symbols': Insufficient data returned: %d bytes\n", len(data)) - return + const limit = 100 + shown := len(symbols) + if shown > limit { + shown = limit } - - // Parse symbol upload info (first 3 uint32s are what we need) - symbolCount := uint32(data[0]) | uint32(data[1])<<8 | uint32(data[2])<<16 | uint32(data[3])<<24 - symbolsSize := uint32(data[4]) | uint32(data[5])<<8 | uint32(data[6])<<16 | uint32(data[7])<<24 - - fmt.Printf("[INFO] Symbol Count: %d, Symbols Size: %d bytes\n", symbolCount, symbolsSize) - - // Now read the full symbol table - symbols, err := client.ReadRaw(port, 0xF00B, 0, symbolsSize) // ADSReservedIndexGroupSymbolUpload - if err != nil { - fmt.Printf("[ERROR] Command 'list_symbols': Failed to read symbol table (port %d): %v\n", port, err) - return + fmt.Printf("[OK] %d symbols total (showing first %d):\n", len(symbols), shown) + for i, sym := range symbols[:shown] { + fmt.Printf(" %3d: %-50s type=%-20s size=%d\n", i+1, sym.Name, sym.Type, sym.Size) } - - fmt.Printf("[OK] Retrieved %d bytes of symbol data\n", len(symbols)) - fmt.Printf("First 100 symbols:\n") - - // Parse symbol entries - this is a simplified parser - offset := uint32(0) - count := 0 - for offset < uint32(len(symbols)) && count < 100 { - if offset+36 > uint32(len(symbols)) { - break - } - - // Read entry length (first uint32) - entryLength := uint32(symbols[offset]) | uint32(symbols[offset+1])<<8 | uint32(symbols[offset+2])<<16 | uint32(symbols[offset+3])<<24 - - if entryLength == 0 || offset+entryLength > uint32(len(symbols)) { - break - } - - // Skip to name offset (at byte 24) - nameOffset := offset + 24 - - // Read name length (uint16 at nameOffset) - if nameOffset+2 > uint32(len(symbols)) { - break - } - nameLength := uint16(symbols[nameOffset]) | uint16(symbols[nameOffset+1])<<8 - - // Read name string (starts at nameOffset+2) - nameStart := nameOffset + 2 - nameEnd := nameStart + uint32(nameLength) - - if nameEnd > uint32(len(symbols)) { - break - } - - name := string(symbols[nameStart:nameEnd]) - if len(name) > 0 && name[len(name)-1] == 0 { - name = name[:len(name)-1] // Remove null terminator - } - - fmt.Printf(" %3d: %s\n", count+1, name) - - count++ - offset += entryLength - } - - if symbolCount > 100 { - fmt.Printf("... and %d more symbols (showing first 100)\n", symbolCount-100) + if len(symbols) > limit { + fmt.Printf(" ... and %d more\n", len(symbols)-limit) } } diff --git a/cmd/cli/cmd_subscriptions.go b/cmd/cli/cmd_subscriptions.go index c887e3d..c20278b 100644 --- a/cmd/cli/cmd_subscriptions.go +++ b/cmd/cli/cmd_subscriptions.go @@ -52,7 +52,7 @@ func createSubscriptionCallback(id int, path string) ads.SubscriptionCallback { func handleSubscribe(args []string, client *ads.Client) { // Hardcoded test configuration var port uint16 = 852 - path := "GLOBAL.gMyBoolToogle" + path := "Global.bool_toggle" // Allow optional path override if len(args) > 0 { @@ -211,7 +211,7 @@ func handleUnsubscribeAll(args []string, client *ads.Client) { // Usage: sub_counter func handleSubCounter(args []string, client *ads.Client) { var port uint16 = 852 - path := "GLOBAL.gMyIntCounter" + path := "Global.int_counter" settings := ads.SubscriptionSettings{ CycleTime: 100 * time.Millisecond, @@ -242,7 +242,7 @@ func handleSubCounter(args []string, client *ads.Client) { // Usage: sub_toggle func handleSubToggle(args []string, client *ads.Client) { var port uint16 = 852 - path := "GLOBAL.gMyBoolToogle" + path := "Global.bool_toggle" settings := ads.SubscriptionSettings{ CycleTime: 100 * time.Millisecond, @@ -273,7 +273,7 @@ func handleSubToggle(args []string, client *ads.Client) { // Usage: sub_timed_counter func handleSubTimedCounter(args []string, client *ads.Client) { var port uint16 = 852 - path := "GLOBAL.gTimedIntCounter" + path := "Global.timed_int_counter" settings := ads.SubscriptionSettings{ CycleTime: 500 * time.Millisecond, @@ -304,7 +304,7 @@ func handleSubTimedCounter(args []string, client *ads.Client) { // Usage: sub_timed_toggle func handleSubTimedToggle(args []string, client *ads.Client) { var port uint16 = 852 - path := "GLOBAL.gTimedBoolToogle" + path := "Global.timed_bool_toggle" settings := ads.SubscriptionSettings{ CycleTime: 500 * time.Millisecond, @@ -342,10 +342,10 @@ func handleSubAll(args []string, client *ads.Client) { cycleTime time.Duration name string }{ - {"GLOBAL.gMyIntCounter", 100 * time.Millisecond, "cycle-based counter"}, - {"GLOBAL.gMyBoolToogle", 100 * time.Millisecond, "cycle-based toggle"}, - {"GLOBAL.gTimedIntCounter", 500 * time.Millisecond, "time-based counter"}, - {"GLOBAL.gTimedBoolToogle", 500 * time.Millisecond, "time-based toggle"}, + {"Global.int_counter", 100 * time.Millisecond, "cycle-based counter"}, + {"Global.bool_toggle", 100 * time.Millisecond, "cycle-based toggle"}, + {"Global.timed_int_counter", 500 * time.Millisecond, "time-based counter"}, + {"Global.timed_bool_toggle", 500 * time.Millisecond, "time-based toggle"}, } createdIDs := []int{} diff --git a/cmd/cli/cmd_util.go b/cmd/cli/cmd_util.go index ed75bf6..fd21169 100644 --- a/cmd/cli/cmd_util.go +++ b/cmd/cli/cmd_util.go @@ -26,6 +26,7 @@ func handleHelp(args []string, client *ads.Client) { fmt.Println(" read_object - Read GLOBAL.gMyDUT (struct)") fmt.Println(" read_array - Read GLOBAL.gIntArray") fmt.Println(" list_symbols - List all available PLC symbols (first 100)") + fmt.Println(" read_attributes [path] [port] - Read type info, attributes, and value of a symbol") fmt.Println("\nWrite Commands:") fmt.Println(" write_value - Write integer to GLOBAL.gMyInt") diff --git a/cmd/cli/cmd_write.go b/cmd/cli/cmd_write.go index b11c7db..5d86a23 100644 --- a/cmd/cli/cmd_write.go +++ b/cmd/cli/cmd_write.go @@ -11,7 +11,7 @@ import ( // handleWriteValue writes a numeric value to the PLC. // Usage: write_value func handleWriteValue(args []string, client *ads.Client) { - data := "GLOBAL.gMyInt" + data := "Global.int_var" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'write_value': No value provided to write.") @@ -38,7 +38,7 @@ func handleWriteValue(args []string, client *ads.Client) { // handleWriteBool writes a boolean value to the PLC. // Usage: write_bool func handleWriteBool(args []string, client *ads.Client) { - data := "GLOBAL.gMyBool" + data := "Global.bool_var" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'write_bool': No value provided to write.") @@ -65,7 +65,7 @@ func handleWriteBool(args []string, client *ads.Client) { // handleWriteObject writes a structured object to the PLC. // Usage: write_object Counter= Ready= func handleWriteObject(args []string, client *ads.Client) { - data := "GLOBAL.gMyDUT" + data := "Global.test_struct" var port uint16 = 852 fields := map[string]string{} for _, arg := range args { @@ -80,22 +80,22 @@ func handleWriteObject(args []string, client *ads.Client) { object := map[string]any{} // Handle Counter (int) - counterStr, ok := fields["Counter"] + counterStr, ok := fields["counter"] if !ok { - fmt.Println("[ERROR] Command 'write_object': Missing required field 'Counter'.") + fmt.Println("[ERROR] Command 'write_object': Missing required field 'counter'.") return } counterVal, err := strconv.Atoi(counterStr) if err != nil { - fmt.Printf("[ERROR] Command 'write_object': Field 'Counter' must be an integer, got '%s'.\n", counterStr) + fmt.Printf("[ERROR] Command 'write_object': Field 'counter' must be an integer, got '%s'.\n", counterStr) return } - object["Counter"] = counterVal + object["counter"] = counterVal // Handle Ready (bool) - readyStr, ok := fields["Ready"] + readyStr, ok := fields["ready"] if !ok { - fmt.Println("[ERROR] Command 'write_object': Missing required field 'Ready'.") + fmt.Println("[ERROR] Command 'write_object': Missing required field 'ready'.") return } var readyVal bool @@ -105,10 +105,10 @@ func handleWriteObject(args []string, client *ads.Client) { case "false": readyVal = false default: - fmt.Println("[ERROR] Command 'write_object': Ready must be 'true' or 'false'.") + fmt.Println("[ERROR] Command 'write_object': Field 'ready' must be 'true' or 'false'.") return } - object["Ready"] = readyVal + object["ready"] = readyVal err = client.WriteValue(port, data, object) if err != nil { @@ -121,7 +121,7 @@ func handleWriteObject(args []string, client *ads.Client) { // handleWriteArray writes an array of integers to the PLC. // Usage: write_array func handleWriteArray(args []string, client *ads.Client) { - data := "GLOBAL.gIntArray" + data := "Global.int_array" var port uint16 = 852 if len(args) != 5 { fmt.Printf("[ERROR] Command 'write_array': You must provide exactly 5 elements to write to the array. Got %d.\n", len(args)) diff --git a/cmd/cli/commandline.go b/cmd/cli/commandline.go index 720aea4..b283463 100644 --- a/cmd/cli/commandline.go +++ b/cmd/cli/commandline.go @@ -64,6 +64,11 @@ func Commandline(client *ads.Client) { readline.PcItem("read_bool"), readline.PcItem("read_object"), readline.PcItem("read_array"), + readline.PcItem("list_symbols"), + readline.PcItem("read_attributes", + readline.PcItem("Main.var_with_standard_attribute"), + readline.PcItem("Main.var_with_custom_attribute"), + ), // Write commands with argument completions readline.PcItem("write_value"), @@ -83,20 +88,20 @@ func Commandline(client *ads.Client) { // Subscription commands with variable path completions readline.PcItem("subscribe", - readline.PcItem("GLOBAL.gMyIntCounter"), - readline.PcItem("GLOBAL.gMyBoolToogle"), - readline.PcItem("GLOBAL.gTimedIntCounter"), - readline.PcItem("GLOBAL.gTimedBoolToogle"), - readline.PcItem("GLOBAL.gMyInt"), - readline.PcItem("GLOBAL.gMyBool"), - readline.PcItem("GLOBAL.gMyDINT"), - readline.PcItem("GLOBAL.gIntCounterActive"), - readline.PcItem("GLOBAL.gBoolToggleActive"), - readline.PcItem("GLOBAL.gTimedCounterActive"), - readline.PcItem("GLOBAL.gTimedToggleActive"), - readline.PcItem("GLOBAL.gCyclePeriod"), - readline.PcItem("GLOBAL.gIntArray"), - readline.PcItem("GLOBAL.gMyDUT"), + readline.PcItem("Global.int_counter"), + readline.PcItem("Global.bool_toggle"), + readline.PcItem("Global.timed_int_counter"), + readline.PcItem("Global.timed_bool_toggle"), + readline.PcItem("Global.int_var"), + readline.PcItem("Global.bool_var"), + readline.PcItem("Global.dint_var"), + readline.PcItem("Global.int_counter_active"), + readline.PcItem("Global.bool_toggle_active"), + readline.PcItem("Global.timed_counter_active"), + readline.PcItem("Global.timed_toggle_active"), + readline.PcItem("Global.cycle_period"), + readline.PcItem("Global.int_array"), + readline.PcItem("Global.test_struct"), ), readline.PcItem("list_subs"), readline.PcItemDynamic(func(line string) []string { diff --git a/cmd/cli/handlers.go b/cmd/cli/handlers.go index 77910a1..038a065 100644 --- a/cmd/cli/handlers.go +++ b/cmd/cli/handlers.go @@ -22,11 +22,12 @@ func getHandlers() map[string]CommandHandler { "set_state": handleSetState, // Read commands (cmd_read.go) - "read_value": handleReadValue, - "read_bool": handleReadBool, - "read_object": handleReadObject, - "read_array": handleReadArray, - "list_symbols": handleListSymbols, + "read_value": handleReadValue, + "read_bool": handleReadBool, + "read_object": handleReadObject, + "read_array": handleReadArray, + "list_symbols": handleListSymbols, + "read_attributes": handleReadAttributes, // Write commands (cmd_write.go) "write_value": handleWriteValue, diff --git a/cmd/main.go b/cmd/main.go index b88b560..4345cba 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,8 +1,10 @@ package main import ( + "flag" "log/slog" "os" + "strconv" "sync" "time" @@ -12,10 +14,12 @@ import ( "github.com/lmittmann/tint" ) -const ( - defaultTargetNetID = "192.168.157.131.1.1" - defaultTimeout = 2 * time.Second -) +func envOrDefault(key, fallback string) string { + if v := os.Getenv(key); v != "" { + return v + } + return fallback +} func main() { logLevel := &slog.LevelVar{} @@ -25,9 +29,39 @@ func main() { slog.SetDefault(slog.New(handler)) slog.Info("main: Starting application") + // Resolve env var defaults before defining flags so that flag --help shows the effective default. + defaultTargetNetID := envOrDefault("ADS_TARGET_NET_ID", "127.0.0.1.1.1") + defaultRouterHost := envOrDefault("ADS_ROUTER_HOST", "127.0.0.1") + + defaultRouterPort := 48898 + if v := os.Getenv("ADS_ROUTER_PORT"); v != "" { + if p, err := strconv.Atoi(v); err == nil { + defaultRouterPort = p + } else { + slog.Warn("main: invalid ADS_ROUTER_PORT, using default", "value", v, "default", defaultRouterPort) + } + } + + defaultTimeout := 2 * time.Second + if v := os.Getenv("ADS_TIMEOUT"); v != "" { + if d, err := time.ParseDuration(v); err == nil { + defaultTimeout = d + } else { + slog.Warn("main: invalid ADS_TIMEOUT, using default", "value", v, "default", defaultTimeout) + } + } + + targetNetID := flag.String("target-net-id", defaultTargetNetID, "AMS NetID of the target TwinCAT runtime (env: ADS_TARGET_NET_ID)") + routerHost := flag.String("router-host", defaultRouterHost, "Hostname or IP of the AMS router (env: ADS_ROUTER_HOST)") + routerPort := flag.Int("router-port", defaultRouterPort, "TCP port of the AMS router (env: ADS_ROUTER_PORT)") + timeout := flag.Duration("timeout", defaultTimeout, "Per-message read/write timeout (env: ADS_TIMEOUT)") + flag.Parse() + settings := ads.ClientSettings{ - TargetNetID: defaultTargetNetID, - Timeout: defaultTimeout, + TargetNetID: *targetNetID, + RouterHost: *routerHost, + RouterPort: *routerPort, + Timeout: *timeout, } // Synchronization for reconnection logic diff --git a/pkg/ads/ads-symbol/parse.go b/pkg/ads/ads-symbol/parse.go index 8b6defc..16e13e3 100644 --- a/pkg/ads/ads-symbol/parse.go +++ b/pkg/ads/ads-symbol/parse.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" + "github.com/jarmocluyse/ads-go/pkg/ads/types" "github.com/jarmocluyse/ads-go/pkg/ads/utils" ) @@ -76,9 +77,9 @@ func ParseSymbol(data []byte) (AdsSymbol, error) { } // Validate remaining data length for variable-length fields - nameLen := int(symbol.NameLength) + 1 // +1 for null terminator - typeLen := int(symbol.TypeLength) + 1 // +1 for null terminator - commentLen := int(symbol.CommentLength) // Comment is not null-terminated + nameLen := int(symbol.NameLength) + 1 // +1 for null terminator + typeLen := int(symbol.TypeLength) + 1 // +1 for null terminator + commentLen := int(symbol.CommentLength) + 1 // +1 for null terminator (comment is also null-terminated) requiredLen := nameLen + typeLen + commentLen if reader.Len() < requiredLen { @@ -99,13 +100,64 @@ func ParseSymbol(data []byte) (AdsSymbol, error) { } symbol.Type = utils.DecodePlcStringBuffer(typeName) - // Read Comment (not null-terminated) + // Read Comment (null-terminated) comment := make([]byte, commentLen) - if commentLen > 0 { - if err := binary.Read(reader, binary.LittleEndian, &comment); err != nil { - return AdsSymbol{}, fmt.Errorf("failed to read Comment: %w", err) + if err := binary.Read(reader, binary.LittleEndian, &comment); err != nil { + return AdsSymbol{}, fmt.Errorf("failed to read Comment: %w", err) + } + symbol.Comment = utils.DecodePlcStringBuffer(comment) + + // Parse array info blocks. The Flags field was read as uint32 combining flags (low uint16) + // and arrayDimension (high uint16) from the wire format. Extract arrayDimension from + // the upper 16 bits; each entry is startIndex (int32) + length (uint32) = 8 bytes. + arrayDimension := uint16(symbol.Flags >> 16) + for i := uint16(0); i < arrayDimension; i++ { + var entry ArrayInfoEntry + if err := binary.Read(reader, binary.LittleEndian, &entry.StartIndex); err != nil { + break + } + if err := binary.Read(reader, binary.LittleEndian, &entry.Length); err != nil { + break + } + symbol.ArrayInfo = append(symbol.ArrayInfo, entry) + } + + // Parse TypeGuid block (16 bytes) if the TypeGuid flag is set. + if symbol.Flags&types.ADSSymbolFlagTypeGuid != 0 { + typeGuidBuf := make([]byte, 16) + if _, err := reader.Read(typeGuidBuf); err == nil { + symbol.TypeGUID = fmt.Sprintf("%x", typeGuidBuf) + } + } + + // Read pragma attributes if ADSSymbolFlagAttributes (0x1000) is set. + // Binary layout per attribute: uint8 nameLen, uint8 valueLen, + // [nameLen+1]byte name (null-terminated), [valueLen+1]byte value (null-terminated). + if symbol.Flags&types.ADSSymbolFlagAttributes != 0 && reader.Len() >= 2 { + var attrCount uint16 + if err := binary.Read(reader, binary.LittleEndian, &attrCount); err == nil { + for i := uint16(0); i < attrCount && reader.Len() >= 2; i++ { + var nameLen, valueLen uint8 + if err := binary.Read(reader, binary.LittleEndian, &nameLen); err != nil { + break + } + if err := binary.Read(reader, binary.LittleEndian, &valueLen); err != nil { + break + } + nameBuf := make([]byte, int(nameLen)+1) + valBuf := make([]byte, int(valueLen)+1) + if _, err := reader.Read(nameBuf); err != nil { + break + } + if _, err := reader.Read(valBuf); err != nil { + break + } + symbol.Attributes = append(symbol.Attributes, SymbolAttribute{ + Name: utils.DecodePlcStringBuffer(nameBuf), + Value: utils.DecodePlcStringBuffer(valBuf), + }) + } } - symbol.Comment = utils.DecodePlcStringBuffer(comment) } return symbol, nil diff --git a/pkg/ads/ads-symbol/parse_test.go b/pkg/ads/ads-symbol/parse_test.go index ad97817..bf5f797 100644 --- a/pkg/ads/ads-symbol/parse_test.go +++ b/pkg/ads/ads-symbol/parse_test.go @@ -1,6 +1,7 @@ package adssymbol import ( + "bytes" "encoding/binary" "errors" "testing" @@ -333,8 +334,8 @@ func buildSymbolData(dataLen uint32, indexGroup uint32, indexOffset uint32, size copy(typeBytes, []byte(typeName)) data = append(data, typeBytes...) - // Append comment (no null terminator) - commentBytes := make([]byte, int(commentLen)) + // Append comment (with null terminator) + commentBytes := make([]byte, int(commentLen)+1) copy(commentBytes, []byte(comment)) data = append(data, commentBytes...) @@ -364,3 +365,188 @@ func buildPartialSymbolData(totalLen int, nameLen uint16, typeLen uint16, commen return data } + +// buildSymbolDataWithAttrs builds symbol binary data including optional TypeGuid and attributes. +// flags should include the appropriate flag bits (TypeGuid=0x8, Attributes=0x1000). +func buildSymbolDataWithAttrs(name, typeName, comment string, flags uint32, typeGuid []byte, attrs []struct{ name, value string }) []byte { + var buf bytes.Buffer + + nameLen := uint16(len(name)) + typeLen := uint16(len(typeName)) + commentLen := uint16(len(comment)) + + // Header (30 bytes): dataLen, indexGroup, indexOffset, size, dataType, flags, nameLen, typeLen, commentLen + binary.Write(&buf, binary.LittleEndian, uint32(0)) // dataLen placeholder + binary.Write(&buf, binary.LittleEndian, uint32(0x1000)) // indexGroup + binary.Write(&buf, binary.LittleEndian, uint32(0x2000)) // indexOffset + binary.Write(&buf, binary.LittleEndian, uint32(256)) // size + binary.Write(&buf, binary.LittleEndian, uint32(types.ADST_STRING)) // dataType + binary.Write(&buf, binary.LittleEndian, flags) // flags (low16=symbol flags, high16=arrayDimension) + binary.Write(&buf, binary.LittleEndian, nameLen) + binary.Write(&buf, binary.LittleEndian, typeLen) + binary.Write(&buf, binary.LittleEndian, commentLen) + + // Name (null-terminated) + buf.WriteString(name) + buf.WriteByte(0) + + // Type (null-terminated) + buf.WriteString(typeName) + buf.WriteByte(0) + + // Comment (null-terminated) + buf.WriteString(comment) + buf.WriteByte(0) + + // TypeGuid (16 bytes) if TypeGuid flag set + if flags&uint32(types.ADSSymbolFlagTypeGuid) != 0 { + guid := typeGuid + if len(guid) == 0 { + guid = make([]byte, 16) + } + buf.Write(guid[:16]) + } + + // Attributes if Attributes flag set + if flags&uint32(types.ADSSymbolFlagAttributes) != 0 { + binary.Write(&buf, binary.LittleEndian, uint16(len(attrs))) + for _, attr := range attrs { + buf.WriteByte(byte(len(attr.name))) + buf.WriteByte(byte(len(attr.value))) + buf.WriteString(attr.name) + buf.WriteByte(0) // name null terminator + buf.WriteString(attr.value) + buf.WriteByte(0) // value null terminator + } + } + + return buf.Bytes() +} + +func TestParseSymbol_WithAttributes(t *testing.T) { + t.Run("attribute with TypeGuid and no comment", func(t *testing.T) { + data := buildSymbolDataWithAttrs( + "MAIN.var_with_custom_attribute", + "STRING(255)", + "", + uint32(types.ADSSymbolFlagTypeGuid)|uint32(types.ADSSymbolFlagAttributes), // 0x1008 + nil, // zeroed TypeGuid + []struct{ name, value string }{ + {"my_custom_attribute", ""}, + }, + ) + + symbol, err := ParseSymbol(data) + assert.NoError(t, err) + assert.Equal(t, "MAIN.var_with_custom_attribute", symbol.Name) + assert.Equal(t, "STRING(255)", symbol.Type) + assert.Equal(t, "00000000000000000000000000000000", symbol.TypeGUID) + assert.Len(t, symbol.Attributes, 1) + assert.Equal(t, "my_custom_attribute", symbol.Attributes[0].Name) + assert.Equal(t, "", symbol.Attributes[0].Value) + }) + + t.Run("attribute with known TypeGuid", func(t *testing.T) { + guid := []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10} + data := buildSymbolDataWithAttrs( + "MAIN.test_var", + "INT", + "", + uint32(types.ADSSymbolFlagTypeGuid)|uint32(types.ADSSymbolFlagAttributes), + guid, + []struct{ name, value string }{ + {"otelcol_role", "log_ring"}, + }, + ) + + symbol, err := ParseSymbol(data) + assert.NoError(t, err) + assert.Equal(t, "0102030405060708090a0b0c0d0e0f10", symbol.TypeGUID) + assert.Len(t, symbol.Attributes, 1) + assert.Equal(t, "otelcol_role", symbol.Attributes[0].Name) + assert.Equal(t, "log_ring", symbol.Attributes[0].Value) + }) + + t.Run("multiple attributes", func(t *testing.T) { + data := buildSymbolDataWithAttrs( + "GVL.multi_attr_var", + "BOOL", + "", + uint32(types.ADSSymbolFlagTypeGuid)|uint32(types.ADSSymbolFlagAttributes), + nil, + []struct{ name, value string }{ + {"attr_one", ""}, + {"attr_two", "value_two"}, + }, + ) + + symbol, err := ParseSymbol(data) + assert.NoError(t, err) + assert.Len(t, symbol.Attributes, 2) + assert.Equal(t, "attr_one", symbol.Attributes[0].Name) + assert.Equal(t, "", symbol.Attributes[0].Value) + assert.Equal(t, "attr_two", symbol.Attributes[1].Name) + assert.Equal(t, "value_two", symbol.Attributes[1].Value) + }) + + t.Run("attributes without TypeGuid", func(t *testing.T) { + data := buildSymbolDataWithAttrs( + "MAIN.simple_attr_var", + "INT", + "some comment", + uint32(types.ADSSymbolFlagAttributes), // no TypeGuid + nil, + []struct{ name, value string }{ + {"my_attr", "my_val"}, + }, + ) + + symbol, err := ParseSymbol(data) + assert.NoError(t, err) + assert.Equal(t, "some comment", symbol.Comment) + assert.Equal(t, "", symbol.TypeGUID) + assert.Len(t, symbol.Attributes, 1) + assert.Equal(t, "my_attr", symbol.Attributes[0].Name) + assert.Equal(t, "my_val", symbol.Attributes[0].Value) + }) + + t.Run("no attributes flag - attributes slice is nil", func(t *testing.T) { + data := buildSymbolData(100, 0x1234, 0x5678, 4, uint32(types.ADST_BIT), 0x0001, 3, 3, 0, "foo", "INT", "") + + symbol, err := ParseSymbol(data) + assert.NoError(t, err) + assert.Nil(t, symbol.Attributes) + assert.Equal(t, "", symbol.TypeGUID) + assert.Nil(t, symbol.ArrayInfo) + }) +} + +func TestParseSymbol_WithArrayInfo(t *testing.T) { + t.Run("1D array symbol", func(t *testing.T) { + // flags: high16 = arrayDimension=1, low16 = 0x0001 + flags := uint32(1<<16) | 0x0001 + var buf bytes.Buffer + binary.Write(&buf, binary.LittleEndian, uint32(0)) // dataLen + binary.Write(&buf, binary.LittleEndian, uint32(0x1000)) // indexGroup + binary.Write(&buf, binary.LittleEndian, uint32(0x2000)) // indexOffset + binary.Write(&buf, binary.LittleEndian, uint32(40)) // size + binary.Write(&buf, binary.LittleEndian, uint32(types.ADST_INT16)) // dataType + binary.Write(&buf, binary.LittleEndian, flags) + binary.Write(&buf, binary.LittleEndian, uint16(7)) // nameLen "arr_var" (7 chars) + binary.Write(&buf, binary.LittleEndian, uint16(3)) // typeLen "INT" (3 chars) + binary.Write(&buf, binary.LittleEndian, uint16(0)) // commentLen + buf.WriteString("arr_var\x00") // name (7+1 bytes) + buf.WriteString("INT\x00") // type (3+1 bytes) + buf.WriteByte(0) // comment null terminator + // Array info: startIndex=-5, length=20 + binary.Write(&buf, binary.LittleEndian, int32(-5)) + binary.Write(&buf, binary.LittleEndian, uint32(20)) + + symbol, err := ParseSymbol(buf.Bytes()) + assert.NoError(t, err) + assert.Equal(t, "arr_var", symbol.Name) + assert.Len(t, symbol.ArrayInfo, 1) + assert.Equal(t, int32(-5), symbol.ArrayInfo[0].StartIndex) + assert.Equal(t, uint32(20), symbol.ArrayInfo[0].Length) + }) +} diff --git a/pkg/ads/ads-symbol/types.go b/pkg/ads/ads-symbol/types.go index 1c7b7e9..d0f7513 100644 --- a/pkg/ads/ads-symbol/types.go +++ b/pkg/ads/ads-symbol/types.go @@ -2,6 +2,19 @@ package adssymbol import "github.com/jarmocluyse/ads-go/pkg/ads/types" +// SymbolAttribute represents a single TwinCAT pragma attribute attached to a +// PLC variable, e.g. {attribute 'otelcol_role' := 'log_ring'}. +type SymbolAttribute struct { + Name string + Value string +} + +// ArrayInfoEntry describes one dimension of an array type. +type ArrayInfoEntry struct { + StartIndex int32 // StartIndex is the lower bound of the array dimension + Length uint32 // Length is the number of elements in this dimension +} + // AdsSymbol represents an ADS symbol with metadata about a PLC variable. // // An ADS symbol contains information about a variable in the PLC including @@ -19,4 +32,7 @@ type AdsSymbol struct { Name string // Name is the variable name in the PLC (e.g., "MAIN.MyVariable") Type string // Type is the variable type name (e.g., "INT", "ARRAY[0..10] OF REAL") Comment string // Comment is the descriptive comment from the PLC code + ArrayInfo []ArrayInfoEntry // ArrayInfo holds dimension info for array types (present when arrayDimension > 0) + TypeGUID string // TypeGUID is the 16-byte type GUID as a hex string (present when Flags & ADSSymbolFlagTypeGuid) + Attributes []SymbolAttribute // Attributes holds TwinCAT pragma attributes (present when Flags & ADSSymbolFlagAttributes) } diff --git a/pkg/ads/client_symbols.go b/pkg/ads/client_symbols.go index 58ad761..00b1d3a 100644 --- a/pkg/ads/client_symbols.go +++ b/pkg/ads/client_symbols.go @@ -1,6 +1,7 @@ package ads import ( + "encoding/binary" "fmt" adssymbol "github.com/jarmocluyse/ads-go/pkg/ads/ads-symbol" @@ -32,3 +33,53 @@ func (c *Client) GetSymbol(port uint16, path string) (*adssymbol.AdsSymbol, erro c.logger.Debug("GetSymbol: Symbol read and parsed", "path", path) return &symbol, nil } + +// UploadInfo returns the number of symbols and the total byte size of the +// symbol table blob, read from ADS index group 0xF00C (SymbolUploadInfo). +func (c *Client) UploadInfo(port uint16) (symCount uint32, symSize uint32, err error) { + data, err := c.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUploadInfo), 0, 8) + if err != nil { + return 0, 0, fmt.Errorf("UploadInfo: %w", err) + } + if len(data) < 8 { + return 0, 0, fmt.Errorf("UploadInfo: short response (%d bytes)", len(data)) + } + symCount = binary.LittleEndian.Uint32(data[0:4]) + symSize = binary.LittleEndian.Uint32(data[4:8]) + return symCount, symSize, nil +} + +// UploadSymbols fetches the full symbol table from the PLC and returns all +// symbols. Reads ADS index group 0xF00B (SymbolUpload). Each entry in the +// blob is prefixed with a uint32 entry length (the same value already stored +// in AdsSymbol.DataLen / the first 4 bytes of each entry), which is used to +// step through the flat blob without requiring the full entry to be valid. +func (c *Client) UploadSymbols(port uint16) ([]adssymbol.AdsSymbol, error) { + _, symSize, err := c.UploadInfo(port) + if err != nil { + return nil, err + } + if symSize == 0 { + return nil, nil + } + + blob, err := c.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUpload), 0, symSize) + if err != nil { + return nil, fmt.Errorf("UploadSymbols: %w", err) + } + + var symbols []adssymbol.AdsSymbol + pos := 0 + for pos+4 <= len(blob) { + entryLen := int(binary.LittleEndian.Uint32(blob[pos : pos+4])) + if entryLen <= 0 || pos+entryLen > len(blob) { + break + } + sym, err := adssymbol.ParseSymbol(blob[pos : pos+entryLen]) + if err == nil { + symbols = append(symbols, sym) + } + pos += entryLen + } + return symbols, nil +} From b4ec4a969d2fe5e1b135ffd518a344372625fe45 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:47:34 +1000 Subject: [PATCH 02/24] Add example2 TwinCAT project with TestStruct, Global GVL, and Main POU --- example2/.gitattributes | 1 + example2/.gitignore | 92 +++++++++++++ example2/AdsGo.sln | 131 ++++++++++++++++++ example2/README.md | 212 ++++++++++++++++++++++++++++++ example2/src/AdsGo.tsproj | 51 +++++++ example2/src/AdsGo_Test.plcproj | 134 +++++++++++++++++++ example2/src/GVLs/Global.TcGVL | 30 +++++ example2/src/Lib/TestStruct.TcDUT | 12 ++ example2/src/POUs/Main.TcPOU | 52 ++++++++ example2/src/Tasks/PlcTask.TcTTO | 16 +++ 10 files changed, 731 insertions(+) create mode 100644 example2/.gitattributes create mode 100644 example2/.gitignore create mode 100644 example2/AdsGo.sln create mode 100644 example2/README.md create mode 100644 example2/src/AdsGo.tsproj create mode 100644 example2/src/AdsGo_Test.plcproj create mode 100644 example2/src/GVLs/Global.TcGVL create mode 100644 example2/src/Lib/TestStruct.TcDUT create mode 100644 example2/src/POUs/Main.TcPOU create mode 100644 example2/src/Tasks/PlcTask.TcTTO diff --git a/example2/.gitattributes b/example2/.gitattributes new file mode 100644 index 0000000..5378fe0 --- /dev/null +++ b/example2/.gitattributes @@ -0,0 +1 @@ +* -text \ No newline at end of file diff --git a/example2/.gitignore b/example2/.gitignore new file mode 100644 index 0000000..49774d5 --- /dev/null +++ b/example2/.gitignore @@ -0,0 +1,92 @@ +# Add any directories, files, or patterns you don't want to be tracked by version control # + +## Ignore Twincat non-source files ## +Confidential/ + +### User-specific files (from 4018 tmc should be ignored) ### +*.~u +*.tpy +*.tmc +*.tmcRefac +*.suo +*.user +*.orig +*.tclrs + +### Build results ### +.engineering_servers/ +*.compileinfo +*.compiled-library +*.bootinfo +*.bootinfo_guids +*.library +*.project.~u +*.tsproj.bak +*.xti.bak +LineIDs.dbg +LineIDs.dbg.bak +_Boot/ +_CompileInfo/ +_Libraries/ +_ModuleInstall/ + +## Ignore TwinCAT HMI temporary files, build results, and +## files generated by popular TwinCAT HMI add-ons. +liveview_* +*.cache +*.db-shm +*.db-wal +*.pid +.hmiframework/ +.hmipkgs/*-*-*-*/ +tchmipublish.journal.json + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +### Visual studio files ### +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +*.dll +*.lib +*.sbr +*.crc +*.cid +*.autostart +*.app +*.compileinfo +*.occ +*.tizip +*.plcproj.orig +.vs/ + +### VS Code files ### +*.vscode + +### Windows files ### +Thumbs.db +*.htm diff --git a/example2/AdsGo.sln b/example2/AdsGo.sln new file mode 100644 index 0000000..534dcff --- /dev/null +++ b/example2/AdsGo.sln @@ -0,0 +1,131 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# TcXaeShell Solution File, Format Version 11.00 +VisualStudioVersion = 17.10.35827.194 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo", "src\AdsGo.tsproj", "{DB567925-AE3D-481C-8033-6FB9C6490B8D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) + Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) + Debug|TwinCAT OS (ARMV7-A) = Debug|TwinCAT OS (ARMV7-A) + Debug|TwinCAT OS (ARMV7-M) = Debug|TwinCAT OS (ARMV7-M) + Debug|TwinCAT OS (ARMV8-A) = Debug|TwinCAT OS (ARMV8-A) + Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) + Debug|TwinCAT OS (x64-E) = Debug|TwinCAT OS (x64-E) + Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) + Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) + Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) + Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) + Release|Any CPU = Release|Any CPU + Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) + Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) + Release|TwinCAT OS (ARMV7-A) = Release|TwinCAT OS (ARMV7-A) + Release|TwinCAT OS (ARMV7-M) = Release|TwinCAT OS (ARMV7-M) + Release|TwinCAT OS (ARMV8-A) = Release|TwinCAT OS (ARMV8-A) + Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) + Release|TwinCAT OS (x64-E) = Release|TwinCAT OS (x64-E) + Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) + Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) + Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) + Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMV7-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-A).Build.0 = Debug|TwinCAT OS (ARMV7-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMV7-M) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-M).Build.0 = Debug|TwinCAT OS (ARMV7-M) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMV8-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV8-A).Build.0 = Debug|TwinCAT OS (ARMV8-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).Build.0 = Debug|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (x64-E) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64-E).Build.0 = Debug|TwinCAT OS (x64-E) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.Build.0 = Release|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMV7-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-A).Build.0 = Release|TwinCAT OS (ARMV7-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMV7-M) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-M).Build.0 = Release|TwinCAT OS (ARMV7-M) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMV8-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV8-A).Build.0 = Release|TwinCAT OS (ARMV8-A) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).Build.0 = Release|TwinCAT OS (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (x64-E) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64-E).Build.0 = Release|TwinCAT OS (x64-E) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMV7-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-A).Build.0 = Debug|TwinCAT OS (ARMV7-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMV7-M) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-M).Build.0 = Debug|TwinCAT OS (ARMV7-M) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMV8-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV8-A).Build.0 = Debug|TwinCAT OS (ARMV8-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).Build.0 = Debug|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (x64-E) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64-E).Build.0 = Debug|TwinCAT OS (x64-E) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.Build.0 = Release|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMV7-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-A).Build.0 = Release|TwinCAT OS (ARMV7-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMV7-M) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-M).Build.0 = Release|TwinCAT OS (ARMV7-M) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMV8-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV8-A).Build.0 = Release|TwinCAT OS (ARMV8-A) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).Build.0 = Release|TwinCAT OS (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (x64-E) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64-E).Build.0 = Release|TwinCAT OS (x64-E) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6ED517DE-02ED-425B-B7FD-97E5B120036F} + EndGlobalSection +EndGlobal diff --git a/example2/README.md b/example2/README.md new file mode 100644 index 0000000..895cb75 --- /dev/null +++ b/example2/README.md @@ -0,0 +1,212 @@ +# Example TwinCAT Project + +This directory contains a complete TwinCAT 3 project that demonstrates the capabilities of the ads-go library and CLI tool. + +## Project Structure + +``` +example2/ +├── AdsGo.sln # Visual Studio solution file +└── src/ + ├── AdsGo.tsproj # TwinCAT project file + ├── AdsGo_Test.plcproj # TwinCAT PLC project file + ├── Programs/ + │ └── Main.TcPOU # Main program with cycle-based and time-based logic + ├── Lib/ + │ └── TestStruct.TcDUT # Sample structured data type + └── Globals/ + └── Global.TcGVL # Global variable list with test variables +``` + +## Opening the Project + +1. Open TwinCAT XAE (Extended Automation Engineering) +2. Open `example2/AdsGo.sln` +3. Start TwinCAT Usermode Runtime +3. Build the project: **TwinCAT → Activate Configuration** +4. Set TwinCAT to RUN mode + +**Note:** The `_Boot/` directory (containing compiled boot files) is excluded from Git per TwinCAT best practices. It will be automatically generated when you activate the configuration in step 3. + +## Available Variables + +The project exposes the following global variables for ADS access: + +### Basic Types (For Testing) +- `Global.int_var: INT` - Simple integer value (default: 0) +- `Global.bool_var: BOOL` - Simple boolean value (default: FALSE) +- `Global.dint_var: DINT` - Simple double integer value (default: 0) + +### Cycle-Based Variables (Updates Every PLC Scan) +- `Global.int_counter: INT` - Increments every PLC cycle when enabled (default: 0) +- `Global.bool_toggle: BOOL` - Toggles every PLC cycle when enabled (default: FALSE) + +### Time-Based Variables (Updates Every Cycle Period) +- `Global.timer_int_counter: INT` - Increments every cycle period when enabled (default: 0) +- `Global.timed_bool_toggle: BOOL` - Toggles every cycle period when enabled (default: FALSE) + +### Control Flags +- `Global.int_counter_active: BOOL` - Enable/disable cycle-based counter (default: TRUE) +- `Global.bool_toggle_active: BOOL` - Enable/disable cycle-based toggle (default: TRUE) +- `Global.timed_int_counter_active: BOOL` - Enable/disable time-based counter (default: TRUE) +- `Global.timed_bool_toggle_active: BOOL` - Enable/disable time-based toggle (default: TRUE) + +### Configuration +- `Global.cycle_period: TIME` - Period for time-based operations (default: T#2S = 2 seconds) + +### Complex Types +- `Global.int_array: ARRAY[0..100] OF INT` - Array of 101 integers +- `Global.test_struct: TestStruct` - Structured data type with: + - `counter: INT` - Integer counter field + - `ready: BOOL` - Boolean ready flag + - `int_array: ARRAY[0..50] OF INT` - Nested integer array + +## PLC Program Logic + +The `Main` program implements two types of behavior: + +### 1. Cycle-Based Behavior (Every PLC Scan) +Executes on every PLC cycle (typically 1-10ms): + +```iecst +// Increment counter if enabled +IF Global.int_counter_active THEN + Global.int_counter := Global.int_counter + 1; +END_IF + +// Toggle boolean if enabled +IF Global.bool_toggle_active THEN + Global.bool_toggle := NOT Global.bool_toggle; +END_IF +``` + +**Use case:** Fast-changing values for testing rapid subscriptions and notifications. + +### 2. Time-Based Behavior (Every Cycle Period) +Executes periodically based on `cycle_period` (default 2 seconds): + +```iecst +// Timer triggers periodic actions +timer(IN := TRUE, PT := Global.cycle_period); + +IF timer.Q THEN + // Increment timed counter if enabled + IF Global.timed_int_counter_active THEN + Global.timer_int_counter := Global.timer_int_counter + 1; + END_IF + + // Toggle timed boolean if enabled + IF Global.timed_bool_toggle_active THEN + Global.timed_bool_toggle := NOT Global.timed_bool_toggle; + END_IF + + // Retrigger timer for next cycle + timer(IN := FALSE); +END_IF +``` + +**Use case:** Slower-changing values for testing different subscription cycle times and demonstrating configurable periods. + +## Using with ads-go CLI + +The CLI tool is pre-configured to work with these variables. See the main [README.md](../README.md#example-twincat-project) for CLI commands. + +### Quick Start Examples + +**Monitor fast-changing counter:** +```bash +./ads-cli +> sub_counter +# Watch counter increment every PLC cycle +``` + +**Control the toggles:** +```bash +> enable_toggle false # Disable cycle-based toggle +> enable_timed_toggle true # Enable time-based toggle +> read_status # Check current states +``` + +**Change timer period:** +```bash +> read_period # Check current period (default 2s) +> set_period 5 # Change to 5 seconds +> sub_timed_counter # Watch it increment every 5s +``` + +**Test all subscriptions:** +```bash +> sub_all # Subscribe to all 4 counters/toggles +> list_subs # View statistics +> unsubscribe_all # Clean up +``` + +## Variable Access Paths + +When using ads-go library programmatically: + +```go +// Read basic values +value, _ := client.ReadValue(851, "Global.int_var") +value, _ := client.ReadValue(851, "Global.bool_var") + +// Read counters +counter, _ := client.ReadValue(851, "Global.int_counter") +timedCounter, _ := client.ReadValue(851, "Global.timer_int_counter") + +// Write control flags +client.WriteValue(851, "Global.int_counter_active", true) +client.WriteValue(851, "Global.cycle_period", int32(5000)) // 5 seconds in ms + +// Read array +array, _ := client.ReadValue(851, "Global.int_array") + +// Read/write struct +dut, _ := client.ReadValue(851, "Global.test_struct") +client.WriteValue(851, "Global.test_struct", map[string]any{ + "counter": int16(100), + "ready": true, +}) + +// Subscribe to changes +callback := func(data ads.SubscriptionData) { + fmt.Printf("Value changed: %v\n", data.Value) +} +settings := ads.SubscriptionSettings{ + CycleTime: 100 * time.Millisecond, + SendOnChange: true, +} +sub, _ := client.SubscribeValue(851, "Global.bool_toggle", callback, settings) +``` + +## Requirements + +- TwinCAT 3 XAE or XAR (Build 4024 or newer recommended) +- Windows OS with TwinCAT runtime +- ADS route configured between client and PLC (see main README for setup instructions) + +## Port Configuration + +- **Default PLC Port:** 851 (TwinCAT 3 first runtime) +- For TwinCAT 2, use port 801 + +## Troubleshooting + +**Variables not found:** +- Ensure TwinCAT is in RUN mode (not CONFIG) +- Verify the PLC program is activated +- Check ADS route is configured correctly + +**Counters not incrementing:** +- Check enable flags: `read_status` in CLI +- Verify PLC is running: `state` in CLI +- For timed counters, verify cycle period: `read_period` in CLI + +**Subscription notifications not received:** +- Ensure PLC is in RUN mode +- Verify the variable is actually changing (check enable flags) +- Check subscription settings (cycle time, on-change mode) + +## License + +This example project is part of ads-go and is licensed under the MIT License. diff --git a/example2/src/AdsGo.tsproj b/example2/src/AdsGo.tsproj new file mode 100644 index 0000000..ae1416f --- /dev/null +++ b/example2/src/AdsGo.tsproj @@ -0,0 +1,51 @@ + + + + + + + + + + + + 2ms + + + 10ms + + + 200ms + + + FileWriterTask + + + PlcTask + + + + + + + AdsGo_Test Instance + {08500001-0000-0000-F000-000000000064} + + + 0 + PlcTask + + #x02010070 + + 20 + 10000000 + + + + + + + + + + diff --git a/example2/src/AdsGo_Test.plcproj b/example2/src/AdsGo_Test.plcproj new file mode 100644 index 0000000..8c2921a --- /dev/null +++ b/example2/src/AdsGo_Test.plcproj @@ -0,0 +1,134 @@ + + + + 1.0.0.0 + 2.0 + {84419b4d-a906-4a7e-b105-28b655a900f8} + True + true + true + false + AdsGo_Test + 3.1.4026.21 + {fb64cf40-248d-4842-835d-2d98102ff47d} + {bfde0c85-6d1d-4c28-95cb-9059e79287bd} + {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} + {60a29fff-f477-4dd6-bc68-20a3e3286849} + {f2821ad3-d81b-4c74-a01a-71474780814f} + {c34386ea-03e6-4409-9a3f-3bcbf5806004} + + + + Code + + + Code + true + + + Code + + + Code + + + + + + + + + + + Tc2_Standard, * (Beckhoff Automation GmbH) + Tc2_Standard + + + Tc2_System, * (Beckhoff Automation GmbH) + Tc2_System + + + Tc3_Module, * (Beckhoff Automation GmbH) + Tc3_Module + + + + + Content + + + + + Content + + + + + + + + "<ProjectRoot>" + + {192FAD59-8248-4824-A8DE-9177C94C195A} + + "{192FAD59-8248-4824-A8DE-9177C94C195A}" + + + + {29BD8D0C-3586-4548-BB48-497B9A01693F} + + "{29BD8D0C-3586-4548-BB48-497B9A01693F}" + + NamingConventions + + "NamingConventions" + + + + Rules + + "Rules" + + + + + + + {40450F57-0AA3-4216-96F3-5444ECB29763} + + "{40450F57-0AA3-4216-96F3-5444ECB29763}" + + + ActiveVisuProfile + IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= + + + {8A0FB252-96EB-4DCC-A5B4-B4804D05E2D6} + + "{8A0FB252-96EB-4DCC-A5B4-B4804D05E2D6}" + + + WriteLineIDs + True + + + {eeeeeeee-3909-4298-8022-501ac3238667} + + "{eeeeeeee-3909-4298-8022-501ac3238667}" + + + + + + + + + System.Boolean + System.Collections.Hashtable + {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} + System.String + + + + + \ No newline at end of file diff --git a/example2/src/GVLs/Global.TcGVL b/example2/src/GVLs/Global.TcGVL new file mode 100644 index 0000000..6fcdb0b --- /dev/null +++ b/example2/src/GVLs/Global.TcGVL @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file diff --git a/example2/src/Lib/TestStruct.TcDUT b/example2/src/Lib/TestStruct.TcDUT new file mode 100644 index 0000000..050b191 --- /dev/null +++ b/example2/src/Lib/TestStruct.TcDUT @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/example2/src/POUs/Main.TcPOU b/example2/src/POUs/Main.TcPOU new file mode 100644 index 0000000..7d2580a --- /dev/null +++ b/example2/src/POUs/Main.TcPOU @@ -0,0 +1,52 @@ + + + + + + + + + \ No newline at end of file diff --git a/example2/src/Tasks/PlcTask.TcTTO b/example2/src/Tasks/PlcTask.TcTTO new file mode 100644 index 0000000..2b3a55a --- /dev/null +++ b/example2/src/Tasks/PlcTask.TcTTO @@ -0,0 +1,16 @@ + + + + + 10000 + 20 + + Main + + {e75eccf1-4734-4003-a381-908429ec142e} + {531d44a7-3855-4784-9564-19c40ec016bb} + {b58bce52-91c0-4e9c-a208-8cc264db9b28} + {27696615-41f8-4e06-9e6b-d4c59aeee840} + {1c86b903-743e-4e71-b426-12bb7d8e1796} + + \ No newline at end of file From c21b5cf4c940602a9723cfa154eb00bf677e1aa0 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:55:56 +1000 Subject: [PATCH 03/24] refactor: reorganize example2 TwinCAT project structure into Globals and Programs folders --- example2/src/AdsGo_Test.plcproj | 33 +++++++++------------ example2/src/{GVLs => Globals}/Global.TcGVL | 0 example2/src/{POUs => Programs}/Main.TcPOU | 0 3 files changed, 14 insertions(+), 19 deletions(-) rename example2/src/{GVLs => Globals}/Global.TcGVL (100%) rename example2/src/{POUs => Programs}/Main.TcPOU (100%) diff --git a/example2/src/AdsGo_Test.plcproj b/example2/src/AdsGo_Test.plcproj index 8c2921a..93a03d0 100644 --- a/example2/src/AdsGo_Test.plcproj +++ b/example2/src/AdsGo_Test.plcproj @@ -21,11 +21,11 @@ Code - + Code true - + Code @@ -34,9 +34,9 @@ - + - + @@ -52,11 +52,6 @@ Tc3_Module - - - Content - - Content @@ -65,8 +60,8 @@ - - + + "<ProjectRoot>" {192FAD59-8248-4824-A8DE-9177C94C195A} @@ -121,14 +116,14 @@ - - - System.Boolean - System.Collections.Hashtable - {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} - System.String - - + + + System.Boolean + System.Collections.Hashtable + {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} + System.String + + \ No newline at end of file diff --git a/example2/src/GVLs/Global.TcGVL b/example2/src/Globals/Global.TcGVL similarity index 100% rename from example2/src/GVLs/Global.TcGVL rename to example2/src/Globals/Global.TcGVL diff --git a/example2/src/POUs/Main.TcPOU b/example2/src/Programs/Main.TcPOU similarity index 100% rename from example2/src/POUs/Main.TcPOU rename to example2/src/Programs/Main.TcPOU From 3ebc1edc0586aad952a3fd5a34c9111aebfa4df6 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Wed, 8 Apr 2026 18:03:36 +1000 Subject: [PATCH 04/24] nil check fix --- pkg/ads/client_connect.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/ads/client_connect.go b/pkg/ads/client_connect.go index b2dd564..2f3c2d9 100644 --- a/pkg/ads/client_connect.go +++ b/pkg/ads/client_connect.go @@ -64,9 +64,11 @@ func (c *Client) Connect() error { // Trigger OnStateChange hook for initial state (with oldState=nil) // Called synchronously so the caller sees the state before Connect() returns. - c.invokeHook("OnStateChange", func() { - c.settings.OnStateChange(c, initialState, nil) - }) + if c.settings.OnStateChange != nil { + c.invokeHook("OnStateChange", func() { + c.settings.OnStateChange(c, initialState, nil) + }) + } } // Start state poller if enabled From 6d51b783700ed8af7fc05950df4031fd159bb511 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 9 Apr 2026 01:06:11 +1000 Subject: [PATCH 05/24] feat(client): add RestartStatePoller() for post-reconnect state monitoring Exposes startStatePoller() as a public method so callers can resume state polling after re-establishing ADS connectivity without a full TCP reconnect (e.g. after a PLC activation detected via restart-index change). Also fixes the ads-stateinfo import to use an explicit alias for clarity. --- pkg/ads/client_state.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/ads/client_state.go b/pkg/ads/client_state.go index 0fb2c21..1b2f14f 100644 --- a/pkg/ads/client_state.go +++ b/pkg/ads/client_state.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/jarmocluyse/ads-go/pkg/ads/ads-stateinfo" + adsstateinfo "github.com/jarmocluyse/ads-go/pkg/ads/ads-stateinfo" "github.com/jarmocluyse/ads-go/pkg/ads/types" ) @@ -269,3 +269,11 @@ func (c *Client) checkStateForOperation(operationName string) error { return nil } + +// RestartStatePoller stops any running state poller and starts a new one. +// Call this after re-establishing ADS connectivity without a full TCP reconnect +// (e.g. after a PLC activation that only changes the restart index) to resume +// state monitoring for future restarts. +func (c *Client) RestartStatePoller() { + c.startStatePoller() +} From e2d7d270425353d5256af4e023f3d60cec5f9c6f Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:55:43 +1000 Subject: [PATCH 06/24] fix(serializer): use subItem.Offset when serializing structs Sequential field writes ignored alignment padding inserted by TwinCAT's pack_mode, causing values to land at wrong byte offsets. Allocate a buffer of dataType.Size bytes (zeroed) and copy each serialized field at its reported subItem.Offset, matching the layout Deserialize expects. --- pkg/ads/ads-serializer/serialize.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/ads/ads-serializer/serialize.go b/pkg/ads/ads-serializer/serialize.go index 99d4192..bed7597 100644 --- a/pkg/ads/ads-serializer/serialize.go +++ b/pkg/ads/ads-serializer/serialize.go @@ -51,6 +51,9 @@ func Serialize(value any, dataType types.AdsDataType, isArrayItem ...bool) ([]by if !ok { return nil, fmt.Errorf("invalid type for struct: %T (expected map[string]any)", value) } + // Allocate the exact struct size reported by the PLC so that any + // alignment padding between fields is preserved as zero bytes. + result := make([]byte, dataType.Size) for _, subItem := range dataType.SubItems { subItemValue, exists := valMap[subItem.Name] if !exists { @@ -60,9 +63,9 @@ func Serialize(value any, dataType types.AdsDataType, isArrayItem ...bool) ([]by if err != nil { return nil, err } - buf.Write(subItemBuf) + copy(result[subItem.Offset:], subItemBuf) } - return buf.Bytes(), nil + return result, nil } // Second: handle arrays (including multidimensional) From c9b7b4c7364015cf63097cf94cef49f58b5562af Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:56:21 +1000 Subject: [PATCH 07/24] test(integration): add example3 PLC project and integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PLC project (example3/): - Deterministic FB: all 21 scalar PLC types driven deterministically from a seed; flat output vars + struct_var (TestStruct) mirror each other - TestStruct: struct covering all supported scalar types (L* types commented out — not supported in TC 4024) - StructTests FB: drives 4 pack_mode variants (0/2/4/8) of a BOOL+DWORD+BOOL+LWORD struct from a seed for layout testing - Main: calls Deterministic and StructTests; holds Go-owned write targets for all types, TestStruct, arrays, and bare pack_* instances Integration tests (test/integration/plc_test.go): - TestStaticSeed: 14 boundary seeds, structural read of TestStruct - TestReadAllAccessPaths: flat FB vars / struct structural / struct linear - TestSubscription: on-change notifications via struct_var - TestWriteAllTypes: flat vars, struct linear, struct structural (map[string]any), FB control vars, arrays - TestStructPacking: two-phase phase 1 (plc_read): PLC fills pack structs from seed, Go reads structurally and asserts against independently computed values phase 2 (write_then_linear_read): Go writes struct structurally, reads each field via its individual linear path — separates Serialize from Deserialize to avoid circular validation --- example3/.vs/AdsGo_Det/v15/.suo | Bin 0 -> 36352 bytes example3/AdsGo_Det.project.~u | 4 + example3/AdsGo_Det.sln | 110 +++++ example3/src/AdsGo_Det.plcproj | 107 ++++ example3/src/AdsGo_Det.tmc | 11 + example3/src/AdsGo_Det.tsproj | 39 ++ example3/src/Globals/GVL_Test.TcGVL | 36 ++ example3/src/Lib/Deterministic.TcPOU | 150 ++++++ example3/src/Lib/PackEight.TcDUT | 14 + example3/src/Lib/PackFour.TcDUT | 14 + example3/src/Lib/PackNone.TcDUT | 14 + example3/src/Lib/PackTwo.TcDUT | 14 + example3/src/Lib/ST_Snapshot.TcDUT | 40 ++ example3/src/Lib/StructTests.TcPOU | 43 ++ example3/src/Lib/TestStruct.TcDUT | 34 ++ example3/src/Programs/Main.TcPOU | 55 +++ example3/src/Tasks/PlcTask.TcTTO | 16 + test/integration/plc_test.go | 698 +++++++++++++++++++++++++++ 18 files changed, 1399 insertions(+) create mode 100644 example3/.vs/AdsGo_Det/v15/.suo create mode 100644 example3/AdsGo_Det.project.~u create mode 100644 example3/AdsGo_Det.sln create mode 100644 example3/src/AdsGo_Det.plcproj create mode 100644 example3/src/AdsGo_Det.tmc create mode 100644 example3/src/AdsGo_Det.tsproj create mode 100644 example3/src/Globals/GVL_Test.TcGVL create mode 100644 example3/src/Lib/Deterministic.TcPOU create mode 100644 example3/src/Lib/PackEight.TcDUT create mode 100644 example3/src/Lib/PackFour.TcDUT create mode 100644 example3/src/Lib/PackNone.TcDUT create mode 100644 example3/src/Lib/PackTwo.TcDUT create mode 100644 example3/src/Lib/ST_Snapshot.TcDUT create mode 100644 example3/src/Lib/StructTests.TcPOU create mode 100644 example3/src/Lib/TestStruct.TcDUT create mode 100644 example3/src/Programs/Main.TcPOU create mode 100644 example3/src/Tasks/PlcTask.TcTTO create mode 100644 test/integration/plc_test.go diff --git a/example3/.vs/AdsGo_Det/v15/.suo b/example3/.vs/AdsGo_Det/v15/.suo new file mode 100644 index 0000000000000000000000000000000000000000..c2cfe1b2f4d902ad22924c969c1b59075f078993 GIT binary patch literal 36352 zcmeHQS!^6fdaj`^>ab*;mS{<)E=!g))ZB+8+nS4qL{b!INKrC3&RiUhG~`e-q)1w1 z)*G)A2T5LXZK5Cna=k2|0Q-=@$s!NghvXqZOk{yz5hTDa^0L4J$s)jRUb1$+uX<|O zGn$(ewU)XEe|L3tRsDb0@n2Qdv+~*A@BhiSI({I^j(5Z+@%b0q#a3Os3E?(%|Edt} zh5OIH_~HvjZvr4_9ABau7#3OlW<{q6iD_JOVv$YR@Nr0NDYp6PI=O~^?XUkS_^#T>9?L>li;Na-*K5tGwrtPm#t?TA-2 zR7mnv)UP5&jq9BV|4d~ryK-Es<1o^ZZgtQ4W*zP*#Oc#AO-CXA5U%?GM*znQaeV#; z!t5^$>yI;tJEx0(3*qyC3xJCNGoTA_319&@0s8z5U#<{$1#wpa!3xjx`9pYK{x16G zFIspb$G>Iv+u!B*e+_kPjDJ>w5YK!3tNu)WKt8~}zaL@6Q#K>K3!u_%LAZQ;94tKF zi|Z?Z1BLseg{#WT>oLT2>f%ozd=hX9@TM-F;=!uB*OyTqwjrGz-~hM^dEB^q0A9e` zg*cV377uvY#{bt)H@^({2*7r&1ghTZU4I8<{4U`40N()oKHv`k`ZDX4VLad18W@4j zL9Hh$63}%LLg__LTiWrK^X(o<8{IGsYi8tvm!LB5$d5 zTwEjmUg&rUS@+Y>{4!{bZnQ>5#^f5Sf0GG>sWzxYV|kpu{{6s~75BvydO!}>M)h7* z=Ft}3|5uQiIv$S*@aBQHAN7z&j|+=Q(33+bE;ZwNJ&^h@?NFs}%0la$KE`wA;Sm9z zFl?T@7yu>HQs!t+8ap3oLI3|cil!XoF@&~`ixJ?b)loY7v=p_^$AO#wC|`hQtzWKNSlv3KKrCfOPini zAp1S-K-zzufD-_v|D8to41jtd^*{26diEc6M7{n;dyqPyUjL&#sO&%Lg6{y{1zZF8 z0DeFKK)sOqUpJr!K-&9oy$-km=m!h{1_3t#Lx5X=VL%uV0gM1f0k;8TfIEP@fcF67 zfUf|40q{QH7XeW~3=jt-0II%H2u}jifP01b46ajvX+Rb*19$+)0mvt30ds(dfO)_I zU=i>E;1OU6unhPmz*hku0yO?Z-WLZxdLWWbaUt^GO(>@gz!8K?-D3hNEG8}4C@7Ce z8I(aiWI=OSa>9q8C5}+N1Nw()Hxen|M7{KU&QdoQ5>mgQmnVlekAfF>18)ZR`LbFF zfHwNalJdMNl`gj+|JcR_^yqV0yyqO+RV(?nY=Z=1=RrXhbfkebEwQg+Rk`T{X)|%m zvF>@SKB*q+#Usx)?Rh=@t9mKg6GQ)7oBnI)e}?||JoUd?{6}e}L2yQT!z&$K;6IfA z^dmRQfAst>49=F3n!d*4G(I~4j+a7gPGZ)cRKiZ5aGQzxgz`~UPE{I9Tj4_zjN>Mx z&OJ!=6mXUE_)+OW($ZBsQ~vD7L+V0}zW))VrB9nj0B_F`kcZZgh76d0iV7`VwKL>z zk@q)>Utj+N&|XGFC!}s^J9O$KVKv;0hy88Zf-CjCM)ChP(tcEs|6xeKctO@u=FaU z4n);G{tzjY{_!3(&II0j7H^eL z+n-@Qur2lX3>*5tq5oIwSBCz-HvU^n{%(Z+Ukkq>|2@^ZeKG#aF8}G@jzONL@T26t zEu{=)8*SkFM`sKA2URcnig=Xcr*ut%hWqetWFhTnbJwEd9ONH;P@H#cRQ_>plRgq2 z<@o6jpx%<7d6+Zm0J5u-9zagmGEm`h6Jcc$n`L_=yBow-#~eX0FAys zO@D>o(El3OKVL-s&yTSd$7rMdqv_R&qNZKT?n4)n2lapUJ9Vh|T37n(=(pujuIDQo zjMQXcoz)wMus>zLZw9|wqd@$nGcNh!yZ3?fl+#9P=%v#i9DkjNH~}CHxYRvpt1A7! z6n_M*Fej}H;^%s}oSd0^TJKj#=>MZVc^1$pe(Llpe>wlr{ExJAw3To^yz>m~V|qW8 zm7? zItwd!26(hJe|?}~x=;i3N6$)Wz}0zq%mgHLYb4?SHPJpg1!%PXiC5ttLTQ}m)n-50 zyU6WJYoZnfS6it6TJ2B&_cZE(eV_i9dOmnH{yDGH==*O)+G_HD75^eyn==9#R#(+y zt@Hoo{eJ+pKP6j!5xS687xcxK_PSMaTABZ6-{)Krk8=E#^&dSYT0V7lw9x*XuTk>9 z9KWIey#J`G*UeuR`LFD7-K#ehWdGs%w1Bvb^=)d# zAdm1AZ0QVs^e=03+~csL=vBB6YidUNooLOEOY3(Lu~CG%4n2=uUMZv;N8Sa*Od&PP zu_LDZSgZc`{r_6^g_M`w$UWDc5qPvh3;Nj(;qCar|D^wJ?%F3mz4pz;Pdoob6;!Dc zYN(3me?&;bk4z@f>67)>gW7vv+Lp7JOQ#2Y2KCN;mYeD)IUm7p%ptVs6-a-!M)lHq zRnnyjNw2`jZM2|kl6tKQf6KH{ohdIJ9OD&e?~+|EUaU5@$m0#Ci;Lo8==5BaPsbp) zWJE9!=$^}?VYzsH2u{)w{It63wO~b{{%0=URSp^B-x&X8EW#N7WSSH?FTwcN^9p^K z0>%N};lt03U6g*Tg|p#4i1RY4XBcdVGC3?x@BEqX!f*b4@3;Q#o1g9fi`x)JVd0rL z@SV@UbG-l0|0wa7-#Gr?UY0h2GU#3B+_E2e6Nr0T?jINcYs=tCS~5EBLz+d*OmS|8 z>FBfMDt-sfk1!ix!_24^KOeLLFZ2aJD09gWsdi&uxEU0CkkW-vtv5+PD9Jm4cdV-ZIH#Dz%KQkZptm`IH;RZ()GyEHp#OOA25+IpE7zZ@m;Mc>@Fr@F6#78x z0I0P!KqYritZ(bptH%KPiCahKDDLXl=JRZC7kX=b3VYYRCRb+y*4`V}zy4}b*Gf<1 zexCL1iM1$ftrtG8Hg2p3YMj`I-s;DgvVh}Sz`e{e%rQr<8K4muZaqu9s|BKki-c4cF2V8_7*uYl-!wu$CsVN?l`if!32Zin>-L zk*0}l6oswzLT$8d6pgEG+!!y|0a@*n&cQU+H7B8kO~8Ln`?X!Ji`MriA8gD;*h2wW z*CVi}S1o#ds(4)HQP+B}TTeeiEehAt>o$tUW_z8X|Cf5QNitz z(*F(lU!B)A#(kfcY%t`1H9x|$;>7DYrfbpIEGJ%z{O5N-_Cr@NiBCMqlvsZl^stmM5kslN&7fU>QBeU z!?U@$_-rJZpUrng;zKt_mX;m`y1N~2zu#(hI-Op#!ygQpeKudW+2ZosE&hPZ(d`N> zn?OE59_ede-uKuo{9WP5WvgrjuOn`8TVh^wB4&x19S*D0?6q61=2$fDNG2z2F4u%} z*>6UA8yl^$GNgx1IP7|%g;@!;=Z*4ev@XI?+cIr6A30=7Jy;X)( z41Hx_U3trb}4zClQ zOWsKad}D**VN0Jcmv_Wnw-_-zeQU&u)PaS2^AA0DZjCVVdOS3FH$Lz41@i;Abq9U% z#KQ+Y%n+Omj|}@qgOfwkcdriyvIFy>zOi1%gurg`Ruq@bGnO@BP6@PaqKg zz&$rK7M_fTM&b*XX6ItVi;i3_A0A7LByRTi-^kq!%(z~^+| zznOH--AX+0-U(ky=6s%xPyI}}=&yfoq~;PceXLhscx3eE z@C|3+PG28C6jyd|uY;!L3(<@D;=KFxWafQC7aE2*&|hLpu|mqf@b=V7dvhuPFVh`iis zxB1*vxf6|c4l$K~8EzOW%J|;_?}#nC!iB z;uI<^^Bdp$$#bv2lUIu?B1`vqK9ib5FVK3M6{{W`g_RGSUker1MYz!q*!EuZJGQ+U z_lExW^P|Ta`d>YDS87m({#V@=F!aBIL2BrKhW=;hfA#f02Q&h%qU0(DhP()Sp#`>= z=waK>>*trWJ%RksqBwLlrO)+1XXE$#c0doAfHp_(XYNrcJZRY03t>MdNA%Acm&hGZO9Az88F$PC~rRXfrL z<-75%n0Hz1a?tNK0jjkXr|P?Ue3uV&?-D3H=NAx?m_yqQD!TDwDb%q72%Di-IT2%( zRK#SM`o0ZM9f;#fCy&(gLrCpJ&H(NMpkhyN47sR@CqN~&Z~fYQu2toaC8$v4H9A)D z>hU2^P0c)m5(n@W{7T1^d>ei>V{bdZpg`SwpDv|Mm-0o`|8MjxA29TPso~eu|Bdla z9`^E%fAT$Yiv8y~%gBvI+IN5W1sHCD;5UEhbI4(px8n5&cJcedzpaklWjFwj#X;uq+PkEB{B5ym$>5?D)lj z(S{NzUCg+;aMdu-he6AhUIaVNX1tLTVfsQ`fVjjGL(H-`EKB450j@-)?4T!x5`uDx z^afCtwknNS`8MR>Hu;V&P)m#2j~^wQ?&9W2+ugA+Bq62i%YNwSR zL_ST%I3;Gkq-z2cu=Xf{H2d8ToZX;?a*iu-`7V?+%cY)^tt-N0-d1#`Y?IEE_N^vH zZ|7+TPdkeVcIp%C;^3@fw_X%h)nfDb#`&Yz)C!hTD z?f>n)@ZEPGw{Mk?4;J$u)Z;u9!Uu(!{c!R5VLWeR)YB+s$|J>;M+zkgg`}hSs6+n< z{d)#q&*9pc@?DOU96ai4F=L-`_Dx{-D)+l;ds{p4EoZj76@EINc~l!Cr_q|F|G<+M zmGbMy$Yos**8GFPvo}5&YjZ3QPd3|wjqz`c{|y}fc6k`%UrH6q$mc!&KWzV-^I!c) z&p$X%z&V1bq>^2LRkP4IYheLrq)d+?WQQ!8fZVZ(tGy27p+(1e2--MIYe$GO z)FDfxwa1buFNw#BXSC_!$iq^iGUwa9ES2(%@;8a}W~AU307wb(QQA?X@XB(jZ*T@= z0%t2qB~>xpO^A1%om7>Qb6ZiiP^wCq*j|ikm*Qr-7QG`Rc5eL<_%;8QhnpYO^~VT5 zE+m4meWk_uQ-$F`OIJD(t#SUFI*9xPlB6|S%Cfvh~T$K0{+P@n*JpWgLUL4LP(hA@l-IzGgQSI3saqwid zXZ%uO0{JJ!q0`mU^a2O}-(wQ#UOS-u1BZrH`H&97LlT#qzyhA&LV9uydX%X7lQZxs z$3J-jpHg?{=qKmlzF=At{YHE8&5QF6_6ydD56}3|F6#fT z^75bG>6MEEKXWQ8b6Q;JsGjSh)PcG8oBO^gr6{*(`*h2m!QPO>J?n=S9pwh!oBfFr zryDiPd2!mP%fgJ(*3Zk>)smO-lCXe^_46`XbsoP;zCoLO-nr{0`a&PZMIXL}djfO+ zKJ>@K0fR^M?MWQ-5+}Gs!be>^+FQAD)iR|hpj zFgeLkI`2UDjGWi77JIF&7_zSj$CKetkAM85Ti<(^#W{<`ISc)@cHTex^{&7D;h+BJ syFeoQyQ`SrrSI= + + + 1.0.0.0 + 2.0 + {A4B7050C-70E7-4D50-A7FA-822A09BE6866} + True + true + true + false + AdsGo_Det + 3.1.4026.21 + {fb64cf40-248d-4842-835d-2d98102ff47d} + {bfde0c85-6d1d-4c28-95cb-9059e79287bd} + {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} + {60a29fff-f477-4dd6-bc68-20a3e3286849} + {f2821ad3-d81b-4c74-a01a-71474780814f} + {c34386ea-03e6-4409-9a3f-3bcbf5806004} + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + Tc2_Standard, * (Beckhoff Automation GmbH) + Tc2_Standard + + + Tc2_System, * (Beckhoff Automation GmbH) + Tc2_System + + + Tc3_Module, * (Beckhoff Automation GmbH) + Tc3_Module + + + + + Content + + + + + + + + "<ProjectRoot>" + + {40450F57-0AA3-4216-96F3-5444ECB29763} + + "{40450F57-0AA3-4216-96F3-5444ECB29763}" + + + ActiveVisuProfile + IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= + + + {192FAD59-8248-4824-A8DE-9177C94C195A} + + "{192FAD59-8248-4824-A8DE-9177C94C195A}" + + + + + + + + + System.Collections.Hashtable + {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} + System.String + + + + + \ No newline at end of file diff --git a/example3/src/AdsGo_Det.tmc b/example3/src/AdsGo_Det.tmc new file mode 100644 index 0000000..b6f058d --- /dev/null +++ b/example3/src/AdsGo_Det.tmc @@ -0,0 +1,11 @@ +ST_LibVersion288iMajorUINT160iMinorUINT1616iBuildUINT1632iRevisionUINT1648nFlagsDWORD3264sVersionSTRING(23)19296TestStruct2752seedUDINT320bool_varBOOL832sint_varSINT840usint_varUSINT848byte_varBYTE856int_varINT1664uint_varUINT1680word_varWORD1696dint_varDINT32128udint_varUDINT32160dword_varDWORD32192lint_varLINT64256ulint_varULINT64320lword_varLWORD64384real_varREAL32448lreal_varLREAL64512time_varTIME32576tod_varTIME_OF_DAY32608date_varDATE32640dt_varDATE_AND_TIME32672string_varSTRING(255)2048704Deterministic6400seedUDINT32640auto_modeBOOL896falseauto_tick_intervalUDINT3212850bool_varBOOL8160sint_varSINT8168usint_varUSINT8176byte_varBYTE8184int_varINT16192uint_varUINT16208word_varWORD16224dint_varDINT32256udint_varUDINT32288dword_varDWORD32320lint_varLINT64384ulint_varULINT64448lword_varLWORD64512real_varREAL32576lreal_varLREAL64640time_varTIME32704tod_varTIME_OF_DAY32736date_varDATE32768dt_varDATE_AND_TIME32800string_varSTRING(255)2048832struct_varTestStruct27522880int_arrayINT0101605632dint_arrayDINT0103205792array_2dINT03031446112_tick_counterUDINT326272_iUDINT326304_jUDINT326336PouTypeFunctionBlockPackNone112b1BOOL80d1DWORD328b2BOOL840lw1LWORD6448pack_mode0PackTwo128b1BOOL80d1DWORD3216b2BOOL848lw1LWORD6464pack_mode2PackFour160b1BOOL80d1DWORD3232b2BOOL864lw1LWORD6496pack_mode4PackEight192b1BOOL80d1DWORD3232b2BOOL864lw1LWORD64128pack_mode8StructTests704seedUDINT3264pack_nonePackNone11296pack_twoPackTwo128208pack_fourPackFour160352pack_eightPackEight192512PouTypeFunctionBlockEPlcPersistentStatus8USINT012PlcAppSystemInfo2048ObjIdOTCID320TaskCntUDINT3232OnlineChangeCntUDINT3264FlagsDWORD3296AdsPortUINT16128BootDataLoadedBOOL8144OldBootDataBOOL8152AppTimestampDT32160KeepOutputsOnBPBOOL8192ShutdownInProgressBOOL8200LicensesPendingBOOL8208BSODOccuredBOOL8216LoggedInBOOL8224PersistentStatusEPlcPersistentStatus8232TComSrvPtrITComObjectServer32256TcComInterfaceAppNameSTRING(63)512512ProjectNameSTRING(63)5121024PlcTaskSystemInfo1024ObjIdOTCID320CycleTimeUDINT3232PriorityUINT1664AdsPortUINT1680CycleCountUDINT3296DcTaskTimeLINT64128LastExecTimeUDINT32192FirstCycleBOOL8224CycleTimeExceededBOOL8232InCallAfterOutputUpdateBOOL8240RTViolationBOOL8248TaskNameSTRING(63)512512_Implicit_KindOfTask16INT_implicit_cyclic0_implicit_event1_implicit_external2_implicit_freewheeling3hidegenerate_implicit_init_function_Implicit_Jitter_Distribution48wRangeMaxWORD160wCountJitterNegWORD1616wCountJitterPosWORD1632hide_Implicit_Task_Info896dwVersionDWORD320pszNameSTRING(80)6464nPriorityINT16128KindOf_Implicit_KindOfTask16144bWatchdogBOOL8160bProfilingTaskBOOL8168dwEventFunctionPointerBYTE64192pszExternalEventSTRING(80)64256dwTaskEntryFunctionPointerBYTE64320dwWatchdogSensitivityDWORD32384dwIntervalDWORD32416dwWatchdogTimeDWORD32448dwLastCycleTimeDWORD32480dwAverageCycleTimeDWORD32512dwMaxCycleTimeDWORD32544dwMinCycleTimeDWORD32576diJitterDINT32608diJitterMinDINT32640diJitterMaxDINT32672dwCycleCountDWORD32704wTaskStatusWORD16736wNumOfJitterDistributionsWORD16752pJitterDistribution_Implicit_Jitter_Distribution64768bWithinSPSTimeSlicingBOOL8832byDummyBYTE8840bShouldBlockBOOL8848bActiveBOOL8856dwIECCycleCountDWORD32864hideAdsGo_Det{08500001-0000-0000-F000-000000000064}0PlcTask#x020100703PlcTask Internal0524288Global_Version.stLibVersion_Tc2_Standard288ST_LibVersion.iMajor3.iMinor4.iBuild5.iRevision0.nFlags1.sVersion3.4.5.0const_non_replacedTcVarGlobal3072000Global_Version.stLibVersion_Tc2_System288ST_LibVersion.iMajor3.iMinor10.iBuild1.iRevision0.nFlags1.sVersion3.10.1.0const_non_replacedTcVarGlobal3072288Global_Version.stLibVersion_Tc3_Module288ST_LibVersion.iMajor3.iMinor4.iBuild5.iRevision0.nFlags1.sVersion3.4.5.0const_non_replacedTcVarGlobal3072576Main.test6400Deterministic3080832Main.write_bool_var8BOOL3087232Main.write_sint_var8SINT3087240Main.write_usint_var8USINT3087248Main.write_byte_var8BYTE3087256Main.write_int_var16INT3087264Main.write_uint_var16UINT3087280Main.write_word_var16WORD3087296Main.write_dint_var32DINT3087328Main.write_udint_var32UDINT3087360Main.write_dword_var32DWORD3087392Main.write_lint_var64LINT3087424Main.write_ulint_var64ULINT3087488Main.write_lword_var64LWORD3087552Main.write_real_var32REAL3087616Main.write_time_var32TIME3087648Main.write_lreal_var64LREAL3087680Main.write_tod_var32TIME_OF_DAY3087744Main.write_date_var32DATE3087776Main.write_dt_var32DATE_AND_TIME3087808Main.write_string_var2048STRING(255)3087840Main.write_struct_var2752TestStruct3089920Main.write_int_array160INT0103092672Main.write_dint_array320DINT0103092832Main.write_2d_array144INT03033093152Main.struct_tests704StructTests3093312Main.pack_none112PackNone3094016Main.pack_two128PackTwo3094128Main.pack_four160PackFour3094272Main.pack_eight192PackEight3094464TwinCAT_SystemInfoVarList._TaskPouOid_PlcTask32OTCIDno_initTcVarGlobal3094816TwinCAT_SystemInfoVarList._AppInfo2048PlcAppSystemInfono_initTcVarGlobal3094848TwinCAT_SystemInfoVarList._TaskInfo1024PlcTaskSystemInfo11no_initTcVarGlobal3096896TwinCAT_SystemInfoVarList._TaskOid_PlcTask32OTCIDno_initTcVarGlobal3097920TwinCAT_SystemInfoVarList.__PlcTask896_Implicit_Task_Info.dwVersion2TcContextNamePlcTaskTcVarGlobal3097984ApplicationNamePort_852ChangeDate2026-04-27T22:53:08GeneratedCodeSize69632GlobalDataSize20480 \ No newline at end of file diff --git a/example3/src/AdsGo_Det.tsproj b/example3/src/AdsGo_Det.tsproj new file mode 100644 index 0000000..6e1760b --- /dev/null +++ b/example3/src/AdsGo_Det.tsproj @@ -0,0 +1,39 @@ + + + + + + + + + + + + PlcTask + + + + + + + AdsGo_Det Instance + {08500001-0000-0000-F000-000000000064} + + + 0 + PlcTask + + #x02010070 + + 20 + 10000000 + + + + + + + + + + diff --git a/example3/src/Globals/GVL_Test.TcGVL b/example3/src/Globals/GVL_Test.TcGVL new file mode 100644 index 0000000..f661700 --- /dev/null +++ b/example3/src/Globals/GVL_Test.TcGVL @@ -0,0 +1,36 @@ + + + + + + diff --git a/example3/src/Lib/Deterministic.TcPOU b/example3/src/Lib/Deterministic.TcPOU new file mode 100644 index 0000000..6700c9a --- /dev/null +++ b/example3/src/Lib/Deterministic.TcPOU @@ -0,0 +1,150 @@ + + + + + + = auto_tick_interval THEN + seed := seed + 1; + _tick_counter := 0; + ELSE + _tick_counter := _tick_counter + 1; + END_IF +END_IF + +// ----------------------------------------------------------------------- +// Update variables — all fields are deterministic functions of seed +// ----------------------------------------------------------------------- +bool_var := (seed MOD 2 = 0); +sint_var := UDINT_TO_SINT(seed); +usint_var := UDINT_TO_USINT(seed); +byte_var := UDINT_TO_BYTE(seed); +int_var := UDINT_TO_INT(seed); +uint_var := UDINT_TO_UINT(seed); +word_var := UDINT_TO_WORD(seed); +dint_var := UDINT_TO_DINT(seed); +udint_var := seed; +dword_var := UDINT_TO_DWORD(seed); +lint_var := UDINT_TO_LINT(seed); +ulint_var := UDINT_TO_ULINT(seed); +lword_var := UDINT_TO_LWORD(seed); +real_var := UDINT_TO_REAL(seed); +lreal_var := UDINT_TO_LREAL(seed); + +// Date/time types — raw truncating casts, same bit pattern Go test will verify +time_var := UDINT_TO_TIME(seed); +tod_var := UDINT_TO_TOD(seed MOD 86400000); +date_var := UDINT_TO_DATE(seed); +dt_var := UDINT_TO_DT(seed); +//ltime_var := ULINT_TO_LTIME(UDINT_TO_ULINT(seed)); +//ltod_var := ULINT_TO_LTOD(UDINT_TO_ULINT(seed) MOD 86400000000000); +//ldate_var := ULINT_TO_LDATE(UDINT_TO_ULINT(seed)); +//ldt_var := ULINT_TO_LDT(UDINT_TO_ULINT(seed)); + +string_var := CONCAT('S=', UDINT_TO_STRING(seed)); + +// ----------------------------------------------------------------------- +// Update test struct — all fields are deterministic functions of seed +// ----------------------------------------------------------------------- +struct_var.seed := seed; + +struct_var.bool_var := bool_var; +struct_var.sint_var := sint_var; +struct_var.usint_var := usint_var; +struct_var.byte_var := byte_var; +struct_var.int_var := int_var; +struct_var.uint_var := uint_var; +struct_var.word_var := word_var; +struct_var.dint_var := dint_var; +struct_var.udint_var := udint_var; +struct_var.dword_var := dword_var; +struct_var.lint_var := lint_var; +struct_var.ulint_var := ulint_var; +struct_var.lword_var := lword_var; +struct_var.real_var := real_var; +struct_var.lreal_var := lreal_var; +struct_var.time_var := time_var; +struct_var.tod_var := tod_var; +struct_var.date_var := date_var; +struct_var.dt_var := dt_var; +//struct_var.ltime_var := ltime_var; +//struct_var.ltod_var := ltod_var; +//struct_var.ldate_var := ldate_var; +//struct_var.ldt_var := ldt_var; +struct_var.string_var := string_var; + +// ----------------------------------------------------------------------- +// Update 1-D arrays: element[i] = UDINT_TO_x(seed + i) +// ----------------------------------------------------------------------- +FOR _i := 0 TO 9 DO + int_array[_i] := UDINT_TO_INT(seed + _i); + dint_array[_i] := UDINT_TO_DINT(seed + _i); +END_FOR + +// ----------------------------------------------------------------------- +// Update 2-D array: element[i,j] = UDINT_TO_INT(seed + i*3 + j) +// ----------------------------------------------------------------------- +FOR _i := 0 TO 2 DO + FOR _j := 0 TO 2 DO + array_2d[_i, _j] := UDINT_TO_INT(seed + _i * 3 + _j); + END_FOR +END_FOR]]> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example3/src/Lib/PackEight.TcDUT b/example3/src/Lib/PackEight.TcDUT new file mode 100644 index 0000000..f4e4b8d --- /dev/null +++ b/example3/src/Lib/PackEight.TcDUT @@ -0,0 +1,14 @@ + + + + + + diff --git a/example3/src/Lib/PackFour.TcDUT b/example3/src/Lib/PackFour.TcDUT new file mode 100644 index 0000000..0e30d18 --- /dev/null +++ b/example3/src/Lib/PackFour.TcDUT @@ -0,0 +1,14 @@ + + + + + + diff --git a/example3/src/Lib/PackNone.TcDUT b/example3/src/Lib/PackNone.TcDUT new file mode 100644 index 0000000..631b9db --- /dev/null +++ b/example3/src/Lib/PackNone.TcDUT @@ -0,0 +1,14 @@ + + + + + + diff --git a/example3/src/Lib/PackTwo.TcDUT b/example3/src/Lib/PackTwo.TcDUT new file mode 100644 index 0000000..eeb8b82 --- /dev/null +++ b/example3/src/Lib/PackTwo.TcDUT @@ -0,0 +1,14 @@ + + + + + + diff --git a/example3/src/Lib/ST_Snapshot.TcDUT b/example3/src/Lib/ST_Snapshot.TcDUT new file mode 100644 index 0000000..12890e0 --- /dev/null +++ b/example3/src/Lib/ST_Snapshot.TcDUT @@ -0,0 +1,40 @@ + + + + + + diff --git a/example3/src/Lib/StructTests.TcPOU b/example3/src/Lib/StructTests.TcPOU new file mode 100644 index 0000000..3918cc5 --- /dev/null +++ b/example3/src/Lib/StructTests.TcPOU @@ -0,0 +1,43 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/example3/src/Lib/TestStruct.TcDUT b/example3/src/Lib/TestStruct.TcDUT new file mode 100644 index 0000000..fac82b3 --- /dev/null +++ b/example3/src/Lib/TestStruct.TcDUT @@ -0,0 +1,34 @@ + + + + + + \ No newline at end of file diff --git a/example3/src/Programs/Main.TcPOU b/example3/src/Programs/Main.TcPOU new file mode 100644 index 0000000..c6a7cea --- /dev/null +++ b/example3/src/Programs/Main.TcPOU @@ -0,0 +1,55 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/example3/src/Tasks/PlcTask.TcTTO b/example3/src/Tasks/PlcTask.TcTTO new file mode 100644 index 0000000..be85513 --- /dev/null +++ b/example3/src/Tasks/PlcTask.TcTTO @@ -0,0 +1,16 @@ + + + + + 10000 + 20 + + Main + + {aec93604-4339-4a5a-b2ca-e7d3aeb2390e} + {f121c7a1-fcc3-4188-8208-80e88bf09ea3} + {7fff27cc-8d44-44b4-89bd-2b34ae3de258} + {53114e16-ba0d-4ca7-b4db-e63e436a5d85} + {cc01cc50-87c4-41b7-b6d7-7519042dc4bf} + + \ No newline at end of file diff --git a/test/integration/plc_test.go b/test/integration/plc_test.go new file mode 100644 index 0000000..80f9158 --- /dev/null +++ b/test/integration/plc_test.go @@ -0,0 +1,698 @@ +//go:build integration + +package integration + +import ( + "fmt" + "os" + "testing" + "time" + + "github.com/jarmocluyse/ads-go/pkg/ads" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +const plcPort = 852 + +// newClient creates an ADS client from environment variables and registers cleanup. +// ADS_TARGET_NET_ID is required. ADS_ROUTER_HOST defaults to 127.0.0.1. +func newClient(t *testing.T) *ads.Client { + t.Helper() + + targetNetID := os.Getenv("ADS_TARGET_NET_ID") + require.NotEmpty(t, targetNetID, "ADS_TARGET_NET_ID env var must be set (e.g. 192.168.1.5.1.1)") + + settings := ads.ClientSettings{ + TargetNetID: targetNetID, + RouterHost: os.Getenv("ADS_ROUTER_HOST"), // empty → LoadDefaults fills 127.0.0.1 + } + + client := ads.NewClient(settings, nil) + require.NoError(t, client.Connect(), "connect to ADS router") + + t.Cleanup(func() { _ = client.Disconnect() }) + return client +} + +// ----------------------------------------------------------------------- +// Expected value computation — pure function, no I/O. +// Mirrors the deterministic formulas in example3/src/Programs/MAIN.TcPOU. +// ----------------------------------------------------------------------- + +type snapshotExpected struct { + Seed uint32 + Bool bool + Sint int8 + Usint uint8 + Byte_ uint8 + Int int16 + Uint uint16 + Word uint16 + Dint int32 + Udint uint32 + Dword uint32 + Lint int64 + Ulint uint64 + Lword uint64 + Real float32 + Lreal float64 + // Date/time raw values (wire encoding: uint32 or uint64) + Time_ uint32 // ms + Tod uint32 // ms since midnight (seed % 86_400_000) + Date uint32 // seconds since 1970-01-01 (raw) + Dt uint32 // seconds since 1970-01-01 (raw) + // Ltime uint64 — not supported in TC 4024 + // Ltod uint64 — not supported in TC 4024 + // Ldate uint64 — not supported in TC 4024 + // Ldt uint64 — not supported in TC 4024 + String string +} + +func expectedValues(seed uint32) snapshotExpected { + return snapshotExpected{ + Seed: seed, + Bool: seed%2 == 0, + Sint: int8(seed), + Usint: uint8(seed), + Byte_: uint8(seed), + Int: int16(seed), + Uint: uint16(seed), + Word: uint16(seed), + Dint: int32(seed), + Udint: seed, + Dword: seed, + Lint: int64(seed), + Ulint: uint64(seed), + Lword: uint64(seed), + Real: float32(seed), + Lreal: float64(seed), + Time_: seed, + Tod: seed % 86_400_000, + Date: seed, + Dt: seed, + String: fmt.Sprintf("S=%d", seed), + } +} + +// ----------------------------------------------------------------------- +// Assertion helpers +// ----------------------------------------------------------------------- + +func assertSnapshot(t *testing.T, raw any, seed uint32) { + t.Helper() + + m, ok := raw.(map[string]any) + require.Truef(t, ok, "snapshot: expected map[string]any, got %T", raw) + + exp := expectedValues(seed) + + assert.Equal(t, exp.Seed, m["seed"], "seed") + assert.Equal(t, exp.Bool, m["bool_var"], "bool_var") + assert.Equal(t, exp.Sint, m["sint_var"], "sint_var") + assert.Equal(t, exp.Usint, m["usint_var"], "usint_var") + assert.Equal(t, exp.Byte_, m["byte_var"], "byte_var") + assert.Equal(t, exp.Int, m["int_var"], "int_var") + assert.Equal(t, exp.Uint, m["uint_var"], "uint_var") + assert.Equal(t, exp.Word, m["word_var"], "word_var") + assert.Equal(t, exp.Dint, m["dint_var"], "dint_var") + assert.Equal(t, exp.Udint, m["udint_var"], "udint_var") + assert.Equal(t, exp.Dword, m["dword_var"], "dword_var") + assert.Equal(t, exp.Lint, m["lint_var"], "lint_var") + assert.Equal(t, exp.Ulint, m["ulint_var"], "ulint_var") + assert.Equal(t, exp.Lword, m["lword_var"], "lword_var") + // float32 is only exact for seeds ≤ 2^24-1 = 16_777_215 + if seed <= 16_777_215 { + assert.Equal(t, exp.Real, m["real_var"], "real_var") + } + assert.Equal(t, exp.Lreal, m["lreal_var"], "lreal_var") + assert.Equal(t, exp.Time_, m["time_var"], "time_var") + assert.Equal(t, exp.Tod, m["tod_var"], "tod_var") + assert.Equal(t, exp.Date, m["date_var"], "date_var") + assert.Equal(t, exp.Dt, m["dt_var"], "dt_var") + // ltime_var / ltod_var / ldate_var / ldt_var not supported in TC 4024 + assert.Equal(t, exp.String, m["string_var"], "string_var") +} + +func assertIntArray(t *testing.T, raw any, seed uint32) { + t.Helper() + arr, ok := raw.([]any) + require.Truef(t, ok, "int_array: expected []any, got %T", raw) + require.Len(t, arr, 10, "int_array length") + for i, v := range arr { + assert.Equal(t, int16(seed+uint32(i)), v, "int_array[%d]", i) + } +} + +func assertDintArray(t *testing.T, raw any, seed uint32) { + t.Helper() + arr, ok := raw.([]any) + require.Truef(t, ok, "dint_array: expected []any, got %T", raw) + require.Len(t, arr, 10, "dint_array length") + for i, v := range arr { + assert.Equal(t, int32(seed+uint32(i)), v, "dint_array[%d]", i) + } +} + +func assert2DArray(t *testing.T, raw any, seed uint32) { + t.Helper() + outer, ok := raw.([]any) + require.Truef(t, ok, "array_2d: expected []any, got %T", raw) + require.Len(t, outer, 3, "array_2d outer dimension") + for i, row := range outer { + inner, ok := row.([]any) + require.Truef(t, ok, "array_2d[%d]: expected []any, got %T", i, row) + require.Len(t, inner, 3, "array_2d[%d] inner dimension", i) + for j, v := range inner { + assert.Equal(t, int16(seed+uint32(i)*3+uint32(j)), v, "array_2d[%d][%d]", i, j) + } + } +} + +// assertLinear reads every scalar field individually from basePath and checks +// against the deterministic expectation for the given seed. +// Works for flat FB vars (base = "Main.test") and struct linear access +// (base = "Main.test.struct_var" or "Main.write_struct_var"). +func assertLinear(t *testing.T, client *ads.Client, base string, seed uint32) { + t.Helper() + exp := expectedValues(seed) + + read := func(field string) any { + t.Helper() + got, err := client.ReadValue(plcPort, base+"."+field) + require.NoError(t, err, "ReadValue %s.%s", base, field) + return got + } + + assert.Equal(t, exp.Seed, read("seed"), "seed") + assert.Equal(t, exp.Bool, read("bool_var"), "bool_var") + assert.Equal(t, exp.Sint, read("sint_var"), "sint_var") + assert.Equal(t, exp.Usint, read("usint_var"), "usint_var") + assert.Equal(t, exp.Byte_, read("byte_var"), "byte_var") + assert.Equal(t, exp.Int, read("int_var"), "int_var") + assert.Equal(t, exp.Uint, read("uint_var"), "uint_var") + assert.Equal(t, exp.Word, read("word_var"), "word_var") + assert.Equal(t, exp.Dint, read("dint_var"), "dint_var") + assert.Equal(t, exp.Udint, read("udint_var"), "udint_var") + assert.Equal(t, exp.Dword, read("dword_var"), "dword_var") + assert.Equal(t, exp.Lint, read("lint_var"), "lint_var") + assert.Equal(t, exp.Ulint, read("ulint_var"), "ulint_var") + assert.Equal(t, exp.Lword, read("lword_var"), "lword_var") + if seed <= 16_777_215 { + assert.Equal(t, exp.Real, read("real_var"), "real_var") + } + assert.Equal(t, exp.Lreal, read("lreal_var"), "lreal_var") + assert.Equal(t, exp.Time_, read("time_var"), "time_var") + assert.Equal(t, exp.Tod, read("tod_var"), "tod_var") + assert.Equal(t, exp.Date, read("date_var"), "date_var") + assert.Equal(t, exp.Dt, read("dt_var"), "dt_var") + // ltime_var / ltod_var / ldate_var / ldt_var not supported in TC 4024 + assert.Equal(t, exp.String, read("string_var"), "string_var") +} + +// ----------------------------------------------------------------------- +// Static seed test — boundary & overflow cases +// Reads struct_var structurally (whole struct in one call) for all 14 seeds. +// ----------------------------------------------------------------------- + +var staticSeedCases = []struct { + name string + seed uint32 +}{ + {"zero", 0}, + {"one", 1}, + {"sint_max", 127}, + {"sint_overflow", 128}, + {"byte_max", 255}, + {"byte_overflow", 256}, + {"int_max", 32_767}, + {"int_sign_flip", 32_768}, + {"uint_max", 65_535}, + {"uint_overflow", 65_536}, + {"real_exact_max", 16_777_215}, + {"dint_max", 2_147_483_647}, + {"dint_sign_boundary", 2_147_483_648}, + {"udint_max", 4_294_967_295}, +} + +func TestStaticSeed(t *testing.T) { + client := newClient(t) + + for _, tc := range staticSeedCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + // Write the driving seed over ADS + require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", tc.seed), "WriteValue seed") + + // Wait for at least 5 PLC cycles (50 ms @ 10 ms cycle) + time.Sleep(50 * time.Millisecond) + + // --- struct_var (structural: whole struct in one read) --- + snapshotRaw, err := client.ReadValue(plcPort, "Main.test.struct_var") + require.NoError(t, err, "ReadValue Main.test.struct_var") + assertSnapshot(t, snapshotRaw, tc.seed) + + // --- 1-D int array --- + intArrRaw, err := client.ReadValue(plcPort, "Main.test.int_array") + require.NoError(t, err, "ReadValue Main.test.int_array") + assertIntArray(t, intArrRaw, tc.seed) + + // --- 1-D dint array --- + dintArrRaw, err := client.ReadValue(plcPort, "Main.test.dint_array") + require.NoError(t, err, "ReadValue Main.test.dint_array") + assertDintArray(t, dintArrRaw, tc.seed) + + // --- 2-D int array --- + arr2DRaw, err := client.ReadValue(plcPort, "Main.test.array_2d") + require.NoError(t, err, "ReadValue Main.test.array_2d") + assert2DArray(t, arr2DRaw, tc.seed) + }) + } +} + +// ----------------------------------------------------------------------- +// Read access-path coverage — verifies all three read patterns for one seed: +// 1. Flat FB vars — Main.test. (individual scalar reads) +// 2. Struct structural — Main.test.struct_var (whole struct in one call) +// 3. Struct linear — Main.test.struct_var. (individual field reads) +// ----------------------------------------------------------------------- + +func TestReadAllAccessPaths(t *testing.T) { + client := newClient(t) + + const seed = uint32(100) + require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", seed), "write seed") + time.Sleep(50 * time.Millisecond) + + t.Run("flat_fb_vars", func(t *testing.T) { + assertLinear(t, client, "Main.test", seed) + }) + + t.Run("struct_structural", func(t *testing.T) { + raw, err := client.ReadValue(plcPort, "Main.test.struct_var") + require.NoError(t, err, "ReadValue Main.test.struct_var") + assertSnapshot(t, raw, seed) + }) + + t.Run("struct_linear", func(t *testing.T) { + assertLinear(t, client, "Main.test.struct_var", seed) + }) +} + +// ----------------------------------------------------------------------- +// Subscription test — auto-increment mode + on-change notifications +// ----------------------------------------------------------------------- + +func TestSubscription(t *testing.T) { + client := newClient(t) + + // Put PLC into a known state: seed=0 + require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", uint32(0)), "reset seed") + time.Sleep(50 * time.Millisecond) + + // Subscribe to the snapshot struct (on-change, checked every PLC cycle) + notifCh := make(chan ads.SubscriptionData, 32) + sub, err := client.SubscribeValue( + plcPort, + "Main.test.struct_var", + func(data ads.SubscriptionData) { + select { + case notifCh <- data: + default: // drop if buffer full; test will fail on timeout + } + }, + ads.SubscriptionSettings{ + CycleTime: 10 * time.Millisecond, + SendOnChange: true, + }, + ) + require.NoError(t, err, "SubscribeValue Main.test.struct_var") + defer func() { _ = client.Unsubscribe(sub) }() + + // Drain the mandatory initial notification sent on subscribe + select { + case <-notifCh: + case <-time.After(3 * time.Second): + t.Fatal("timeout waiting for initial subscription notification") + } + + // Drive seed directly from Go and wait until the notification reflects the written value. + // Stale notifications (from before the write) are drained until gotSeed == nextSeed. + const wantNotifs = 10 + + for i := 0; i < wantNotifs; i++ { + nextSeed := uint32(i + 1) + require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", nextSeed), "write seed %d", nextSeed) + + deadline := time.After(5 * time.Second) + for { + select { + case data := <-notifCh: + m, ok := data.Value.(map[string]any) + require.Truef(t, ok, "notification %d: value should be map[string]any, got %T", i, data.Value) + + gotSeed, ok := m["seed"].(uint32) + require.Truef(t, ok, "notification %d: seed should be uint32", i) + + if gotSeed < nextSeed { + // stale notification — keep draining + continue + } + + require.Equalf(t, nextSeed, gotSeed, "notification %d: unexpected seed", i) + assertSnapshot(t, data.Value, gotSeed) + + case <-deadline: + t.Fatalf("timeout waiting for subscription notification %d/%d", i+1, wantNotifs) + } + break + } + } +} + +// ----------------------------------------------------------------------- +// Write coverage — exercises WriteValue for every PLC type via: +// 1. Flat MAIN-level vars — Main.write__var (atomic scalar writes) +// 2. Struct linear fields — Main.write_struct_var. +// 3. Struct structural — Main.write_struct_var (whole struct at once) [SKIP: not yet implemented] +// 4. FB control vars — Main.test.seed / auto_mode / auto_tick_interval +// 5. Arrays — Main.write_int_array / write_dint_array / write_2d_array +// ----------------------------------------------------------------------- + +type writeCase struct { + path string + write any + check func(t *testing.T, got any) +} + +func eqCheck(want any) func(t *testing.T, got any) { + return func(t *testing.T, got any) { t.Helper(); assert.Equal(t, want, got) } +} + +func deltaCheck(want, delta float64) func(t *testing.T, got any) { + return func(t *testing.T, got any) { t.Helper(); assert.InDelta(t, want, got, delta) } +} + +func runWriteCases(t *testing.T, client *ads.Client, cases []writeCase) { + t.Helper() + for _, tc := range cases { + tc := tc + t.Run(tc.path, func(t *testing.T) { + require.NoError(t, client.WriteValue(plcPort, tc.path, tc.write), "WriteValue %s", tc.path) + time.Sleep(20 * time.Millisecond) + got, err := client.ReadValue(plcPort, tc.path) + require.NoError(t, err, "ReadValue %s", tc.path) + tc.check(t, got) + }) + } +} + +func TestWriteAllTypes(t *testing.T) { + client := newClient(t) + + // ------------------------------------------------------------------ + // 1. Flat MAIN-level vars — PLC never touches these + // ------------------------------------------------------------------ + t.Run("flat_main_vars", func(t *testing.T) { + const m = "Main" + runWriteCases(t, client, []writeCase{ + {m + ".write_bool_var", true, eqCheck(true)}, + {m + ".write_bool_var", false, eqCheck(false)}, + {m + ".write_sint_var", int8(-99), eqCheck(int8(-99))}, + {m + ".write_usint_var", uint8(200), eqCheck(uint8(200))}, + {m + ".write_byte_var", uint8(0xFF), eqCheck(uint8(0xFF))}, + {m + ".write_int_var", int16(-32000), eqCheck(int16(-32000))}, + {m + ".write_uint_var", uint16(65000), eqCheck(uint16(65000))}, + {m + ".write_word_var", uint16(0xABCD), eqCheck(uint16(0xABCD))}, + {m + ".write_dint_var", int32(-2_000_000), eqCheck(int32(-2_000_000))}, + {m + ".write_udint_var", uint32(3_000_000), eqCheck(uint32(3_000_000))}, + {m + ".write_dword_var", uint32(0xDEADBEEF), eqCheck(uint32(0xDEADBEEF))}, + {m + ".write_lint_var", int64(-9_000_000_000), eqCheck(int64(-9_000_000_000))}, + {m + ".write_ulint_var", uint64(18_000_000_000), eqCheck(uint64(18_000_000_000))}, + {m + ".write_lword_var", uint64(0xCAFEBABEDEADBEEF), eqCheck(uint64(0xCAFEBABEDEADBEEF))}, + {m + ".write_real_var", float32(3.14), deltaCheck(float64(float32(3.14)), 1e-4)}, + {m + ".write_lreal_var", float64(2.718281828), deltaCheck(2.718281828, 1e-9)}, + {m + ".write_time_var", uint32(5000), eqCheck(uint32(5000))}, + {m + ".write_tod_var", uint32(3_600_000), eqCheck(uint32(3_600_000))}, + {m + ".write_date_var", uint32(1_000_000), eqCheck(uint32(1_000_000))}, + {m + ".write_dt_var", uint32(1_700_000_000), eqCheck(uint32(1_700_000_000))}, + {m + ".write_string_var", "hello ADS", eqCheck("hello ADS")}, + }) + }) + + // ------------------------------------------------------------------ + // 2. Struct fields — linear access, one field at a time + // ------------------------------------------------------------------ + t.Run("struct_linear", func(t *testing.T) { + const s = "Main.write_struct_var" + runWriteCases(t, client, []writeCase{ + {s + ".seed", uint32(77), eqCheck(uint32(77))}, + {s + ".bool_var", true, eqCheck(true)}, + {s + ".bool_var", false, eqCheck(false)}, + {s + ".sint_var", int8(-50), eqCheck(int8(-50))}, + {s + ".usint_var", uint8(150), eqCheck(uint8(150))}, + {s + ".byte_var", uint8(0xAB), eqCheck(uint8(0xAB))}, + {s + ".int_var", int16(-1000), eqCheck(int16(-1000))}, + {s + ".uint_var", uint16(1000), eqCheck(uint16(1000))}, + {s + ".word_var", uint16(0x1234), eqCheck(uint16(0x1234))}, + {s + ".dint_var", int32(-100_000), eqCheck(int32(-100_000))}, + {s + ".udint_var", uint32(100_000), eqCheck(uint32(100_000))}, + {s + ".dword_var", uint32(0x12345678), eqCheck(uint32(0x12345678))}, + {s + ".lint_var", int64(-1_000_000_000), eqCheck(int64(-1_000_000_000))}, + {s + ".ulint_var", uint64(1_000_000_000), eqCheck(uint64(1_000_000_000))}, + {s + ".lword_var", uint64(0xDEADBEEF12345678), eqCheck(uint64(0xDEADBEEF12345678))}, + {s + ".real_var", float32(1.5), deltaCheck(float64(float32(1.5)), 1e-4)}, + {s + ".lreal_var", float64(3.141592653589793), deltaCheck(3.141592653589793, 1e-9)}, + {s + ".time_var", uint32(2000), eqCheck(uint32(2000))}, + {s + ".tod_var", uint32(7_200_000), eqCheck(uint32(7_200_000))}, + {s + ".date_var", uint32(500_000), eqCheck(uint32(500_000))}, + {s + ".dt_var", uint32(1_600_000_000), eqCheck(uint32(1_600_000_000))}, + {s + ".string_var", "write test", eqCheck("write test")}, + }) + }) + + // ------------------------------------------------------------------ + // 3. Struct structural write — write the whole struct in one call + // Serialize already handles map[string]any for structs. + // ------------------------------------------------------------------ + t.Run("struct_structural", func(t *testing.T) { + const seed = uint32(77) + exp := expectedValues(seed) + m := map[string]any{ + "seed": exp.Seed, + "bool_var": exp.Bool, + "sint_var": exp.Sint, + "usint_var": exp.Usint, + "byte_var": exp.Byte_, + "int_var": exp.Int, + "uint_var": exp.Uint, + "word_var": exp.Word, + "dint_var": exp.Dint, + "udint_var": exp.Udint, + "dword_var": exp.Dword, + "lint_var": exp.Lint, + "ulint_var": exp.Ulint, + "lword_var": exp.Lword, + "real_var": exp.Real, + "lreal_var": exp.Lreal, + "time_var": exp.Time_, + "tod_var": exp.Tod, + "date_var": exp.Date, + "dt_var": exp.Dt, + "string_var": exp.String, + } + require.NoError(t, client.WriteValue(plcPort, "Main.write_struct_var", m)) + time.Sleep(20 * time.Millisecond) + got, err := client.ReadValue(plcPort, "Main.write_struct_var") + require.NoError(t, err) + assertSnapshot(t, got, seed) + }) + + // ------------------------------------------------------------------ + // 4. FB control vars — public vars on the Deterministic FB instance + // ------------------------------------------------------------------ + t.Run("fb_control_vars", func(t *testing.T) { + const fb = "Main.test" + runWriteCases(t, client, []writeCase{ + {fb + ".seed", uint32(999), eqCheck(uint32(999))}, + {fb + ".auto_mode", true, eqCheck(true)}, + {fb + ".auto_mode", false, eqCheck(false)}, + {fb + ".auto_tick_interval", uint32(123), eqCheck(uint32(123))}, + }) + // Restore stable state + require.NoError(t, client.WriteValue(plcPort, fb+".auto_mode", false), "restore auto_mode") + require.NoError(t, client.WriteValue(plcPort, fb+".seed", uint32(0)), "restore seed") + require.NoError(t, client.WriteValue(plcPort, fb+".auto_tick_interval", uint32(50)), "restore tick interval") + }) + + // ------------------------------------------------------------------ + // 5. Array write + read + // ------------------------------------------------------------------ + t.Run("int_array", func(t *testing.T) { + writeVal := make([]int16, 10) + for i := range writeVal { + writeVal[i] = int16(i * 10) + } + require.NoError(t, client.WriteValue(plcPort, "Main.write_int_array", writeVal)) + time.Sleep(20 * time.Millisecond) + got, err := client.ReadValue(plcPort, "Main.write_int_array") + require.NoError(t, err) + arr, ok := got.([]any) + require.True(t, ok, "expected []any got %T", got) + require.Len(t, arr, 10) + for i, v := range arr { + assert.Equal(t, int16(i*10), v, "write_int_array[%d]", i) + } + }) + + t.Run("dint_array", func(t *testing.T) { + writeVal := make([]int32, 10) + for i := range writeVal { + writeVal[i] = int32(i * 1000) + } + require.NoError(t, client.WriteValue(plcPort, "Main.write_dint_array", writeVal)) + time.Sleep(20 * time.Millisecond) + got, err := client.ReadValue(plcPort, "Main.write_dint_array") + require.NoError(t, err) + arr, ok := got.([]any) + require.True(t, ok, "expected []any got %T", got) + require.Len(t, arr, 10) + for i, v := range arr { + assert.Equal(t, int32(i*1000), v, "write_dint_array[%d]", i) + } + }) + + t.Run("2d_array", func(t *testing.T) { + writeVal := [][]int16{ + {1, 2, 3}, + {4, 5, 6}, + {7, 8, 9}, + } + require.NoError(t, client.WriteValue(plcPort, "Main.write_2d_array", writeVal)) + time.Sleep(20 * time.Millisecond) + got, err := client.ReadValue(plcPort, "Main.write_2d_array") + require.NoError(t, err) + outer, ok := got.([]any) + require.True(t, ok, "expected []any got %T", got) + require.Len(t, outer, 3) + for i, row := range outer { + inner, ok := row.([]any) + require.True(t, ok) + require.Len(t, inner, 3) + for j, v := range inner { + assert.Equal(t, writeVal[i][j], v, "write_2d_array[%d][%d]", i, j) + } + } + }) +} + +// ----------------------------------------------------------------------- +// Struct packing — the same four fields under pack_mode 0/2/4/8. +// +// Field layout: b1 BOOL | d1 DWORD | b2 BOOL | lw1 LWORD +// This layout causes the DWORD and LWORD to land at different byte offsets +// under each pack mode, so the serializer must use subItem.Offset (as +// reported by the PLC's ADS type info) rather than packing fields naively. +// +// Expected offsets per Beckhoff docs: +// pack_mode 0: b1=0 d1=1 b2=5 lw1=6 (total 14) +// pack_mode 2: b1=0 d1=2 b2=6 lw1=8 (total 16) +// pack_mode 4: b1=0 d1=4 b2=8 lw1=12 (total 20) +// pack_mode 8: b1=0 d1=4 b2=8 lw1=16 (total 24) +// +// Two-phase strategy to avoid circular validation: +// +// Phase 1 — plc_read: PLC fills structs from seed; Go reads structurally +// and asserts against independently computed expected values. +// If Serialize had a bug but Deserialize was symmetric, this would catch it. +// +// Phase 2 — write_then_linear_read: Go writes structs structurally +// (WriteValue with map[string]any), then reads each field individually +// via its linear ADS path. Structural write is validated by linear reads — +// different code paths, no circular dependency. +// ----------------------------------------------------------------------- + +// packExpected computes the deterministic values for any pack struct from seed. +// Formula matches StructTests.TcPOU exactly. +func packExpected(seed uint32) (b1 bool, d1 uint32, b2 bool, lw1 uint64) { + return seed%2 == 0, seed, seed%3 == 0, uint64(seed) * 3 +} + +func assertPackStruct(t *testing.T, got any, seed uint32) { + t.Helper() + m, ok := got.(map[string]any) + require.True(t, ok, "expected map[string]any got %T", got) + b1, d1, b2, lw1 := packExpected(seed) + assert.Equal(t, b1, m["b1"], "b1") + assert.Equal(t, d1, m["d1"], "d1") + assert.Equal(t, b2, m["b2"], "b2") + assert.Equal(t, lw1, m["lw1"], "lw1") +} + +func TestStructPacking(t *testing.T) { + client := newClient(t) + + packPaths := []struct{ name, plcRead, writeTarget string }{ + {"pack_none", "Main.struct_tests.pack_none", "Main.pack_none"}, + {"pack_two", "Main.struct_tests.pack_two", "Main.pack_two"}, + {"pack_four", "Main.struct_tests.pack_four", "Main.pack_four"}, + {"pack_eight", "Main.struct_tests.pack_eight", "Main.pack_eight"}, + } + + // ------------------------------------------------------------------ + // Phase 1: PLC-driven read. + // Go writes a seed, PLC fills all 4 structs deterministically. + // Go reads structurally and asserts against independently computed values. + // ------------------------------------------------------------------ + t.Run("plc_read", func(t *testing.T) { + for _, seed := range []uint32{0, 1, 2, 3, 6, 100, 0xFFFFFFFF} { + seed := seed + t.Run(fmt.Sprintf("seed_%d", seed), func(t *testing.T) { + require.NoError(t, client.WriteValue(plcPort, "Main.struct_tests.seed", seed)) + time.Sleep(20 * time.Millisecond) + for _, p := range packPaths { + p := p + t.Run(p.name, func(t *testing.T) { + got, err := client.ReadValue(plcPort, p.plcRead) + require.NoError(t, err, "ReadValue %s", p.plcRead) + assertPackStruct(t, got, seed) + }) + } + }) + } + }) + + // ------------------------------------------------------------------ + // Phase 2: Write structurally, read back each field linearly. + // Structural Serialize and linear Deserialize are independent code paths. + // ------------------------------------------------------------------ + t.Run("write_then_linear_read", func(t *testing.T) { + const seed = uint32(42) + b1, d1, b2, lw1 := packExpected(seed) + val := map[string]any{"b1": b1, "d1": d1, "b2": b2, "lw1": lw1} + + for _, p := range packPaths { + p := p + t.Run(p.name, func(t *testing.T) { + require.NoError(t, client.WriteValue(plcPort, p.writeTarget, val), "WriteValue %s", p.writeTarget) + time.Sleep(20 * time.Millisecond) + + gotB1, err := client.ReadValue(plcPort, p.writeTarget+".b1") + require.NoError(t, err) + assert.Equal(t, b1, gotB1, "b1") + + gotD1, err := client.ReadValue(plcPort, p.writeTarget+".d1") + require.NoError(t, err) + assert.Equal(t, d1, gotD1, "d1") + + gotB2, err := client.ReadValue(plcPort, p.writeTarget+".b2") + require.NoError(t, err) + assert.Equal(t, b2, gotB2, "b2") + + gotLw1, err := client.ReadValue(plcPort, p.writeTarget+".lw1") + require.NoError(t, err) + assert.Equal(t, lw1, gotLw1, "lw1") + }) + } + }) +} From d668aa9d693d6964fd8fc4f13a32d1b9fba04081 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:02:30 +1000 Subject: [PATCH 08/24] chore(example3): add .gitattributes, .gitignore, rename solution --- example3/.gitattributes | 1 + example3/.gitignore | 92 ++++++++ example3/{AdsGo_Det.sln => AdsGo_Testing.sln} | 220 +++++++++--------- 3 files changed, 203 insertions(+), 110 deletions(-) create mode 100644 example3/.gitattributes create mode 100644 example3/.gitignore rename example3/{AdsGo_Det.sln => AdsGo_Testing.sln} (98%) diff --git a/example3/.gitattributes b/example3/.gitattributes new file mode 100644 index 0000000..5378fe0 --- /dev/null +++ b/example3/.gitattributes @@ -0,0 +1 @@ +* -text \ No newline at end of file diff --git a/example3/.gitignore b/example3/.gitignore new file mode 100644 index 0000000..49774d5 --- /dev/null +++ b/example3/.gitignore @@ -0,0 +1,92 @@ +# Add any directories, files, or patterns you don't want to be tracked by version control # + +## Ignore Twincat non-source files ## +Confidential/ + +### User-specific files (from 4018 tmc should be ignored) ### +*.~u +*.tpy +*.tmc +*.tmcRefac +*.suo +*.user +*.orig +*.tclrs + +### Build results ### +.engineering_servers/ +*.compileinfo +*.compiled-library +*.bootinfo +*.bootinfo_guids +*.library +*.project.~u +*.tsproj.bak +*.xti.bak +LineIDs.dbg +LineIDs.dbg.bak +_Boot/ +_CompileInfo/ +_Libraries/ +_ModuleInstall/ + +## Ignore TwinCAT HMI temporary files, build results, and +## files generated by popular TwinCAT HMI add-ons. +liveview_* +*.cache +*.db-shm +*.db-wal +*.pid +.hmiframework/ +.hmipkgs/*-*-*-*/ +tchmipublish.journal.json + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +### Visual studio files ### +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +*.dll +*.lib +*.sbr +*.crc +*.cid +*.autostart +*.app +*.compileinfo +*.occ +*.tizip +*.plcproj.orig +.vs/ + +### VS Code files ### +*.vscode + +### Windows files ### +Thumbs.db +*.htm diff --git a/example3/AdsGo_Det.sln b/example3/AdsGo_Testing.sln similarity index 98% rename from example3/AdsGo_Det.sln rename to example3/AdsGo_Testing.sln index ca95224..ece293b 100644 --- a/example3/AdsGo_Det.sln +++ b/example3/AdsGo_Testing.sln @@ -1,110 +1,110 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# TcXaeShell Solution File, Format Version 11.00 -VisualStudioVersion = 15.0.35826.109 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo_Det", "src\AdsGo_Det.tsproj", "{F2E11A39-BD69-4075-88F6-40AA79B820D2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) - Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) - Debug|TwinCAT OS (ARMV7-A) = Debug|TwinCAT OS (ARMV7-A) - Debug|TwinCAT OS (ARMV7-M) = Debug|TwinCAT OS (ARMV7-M) - Debug|TwinCAT OS (ARMV8-A) = Debug|TwinCAT OS (ARMV8-A) - Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) - Debug|TwinCAT OS (x64-E) = Debug|TwinCAT OS (x64-E) - Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) - Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) - Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) - Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) - Release|Any CPU = Release|Any CPU - Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) - Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) - Release|TwinCAT OS (ARMV7-A) = Release|TwinCAT OS (ARMV7-A) - Release|TwinCAT OS (ARMV7-M) = Release|TwinCAT OS (ARMV7-M) - Release|TwinCAT OS (ARMV8-A) = Release|TwinCAT OS (ARMV8-A) - Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) - Release|TwinCAT OS (x64-E) = Release|TwinCAT OS (x64-E) - Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) - Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) - Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) - Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EB6B064A-0FAE-4CCA-B79A-5667D02000D5} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# TcXaeShell Solution File, Format Version 11.00 +VisualStudioVersion = 15.0.35826.109 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo_Det", "src\AdsGo_Det.tsproj", "{F2E11A39-BD69-4075-88F6-40AA79B820D2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) + Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) + Debug|TwinCAT OS (ARMV7-A) = Debug|TwinCAT OS (ARMV7-A) + Debug|TwinCAT OS (ARMV7-M) = Debug|TwinCAT OS (ARMV7-M) + Debug|TwinCAT OS (ARMV8-A) = Debug|TwinCAT OS (ARMV8-A) + Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) + Debug|TwinCAT OS (x64-E) = Debug|TwinCAT OS (x64-E) + Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) + Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) + Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) + Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) + Release|Any CPU = Release|Any CPU + Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) + Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) + Release|TwinCAT OS (ARMV7-A) = Release|TwinCAT OS (ARMV7-A) + Release|TwinCAT OS (ARMV7-M) = Release|TwinCAT OS (ARMV7-M) + Release|TwinCAT OS (ARMV8-A) = Release|TwinCAT OS (ARMV8-A) + Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) + Release|TwinCAT OS (x64-E) = Release|TwinCAT OS (x64-E) + Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) + Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) + Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) + Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EB6B064A-0FAE-4CCA-B79A-5667D02000D5} + EndGlobalSection +EndGlobal From ccd456a36e82d57228b5f2fd2030aaa5fd2d27e5 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:05:54 +1000 Subject: [PATCH 09/24] chore(example3): untrack .suo binary (now covered by .gitignore) --- example3/.vs/AdsGo_Det/v15/.suo | Bin 36352 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 example3/.vs/AdsGo_Det/v15/.suo diff --git a/example3/.vs/AdsGo_Det/v15/.suo b/example3/.vs/AdsGo_Det/v15/.suo deleted file mode 100644 index c2cfe1b2f4d902ad22924c969c1b59075f078993..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 36352 zcmeHQS!^6fdaj`^>ab*;mS{<)E=!g))ZB+8+nS4qL{b!INKrC3&RiUhG~`e-q)1w1 z)*G)A2T5LXZK5Cna=k2|0Q-=@$s!NghvXqZOk{yz5hTDa^0L4J$s)jRUb1$+uX<|O zGn$(ewU)XEe|L3tRsDb0@n2Qdv+~*A@BhiSI({I^j(5Z+@%b0q#a3Os3E?(%|Edt} zh5OIH_~HvjZvr4_9ABau7#3OlW<{q6iD_JOVv$YR@Nr0NDYp6PI=O~^?XUkS_^#T>9?L>li;Na-*K5tGwrtPm#t?TA-2 zR7mnv)UP5&jq9BV|4d~ryK-Es<1o^ZZgtQ4W*zP*#Oc#AO-CXA5U%?GM*znQaeV#; z!t5^$>yI;tJEx0(3*qyC3xJCNGoTA_319&@0s8z5U#<{$1#wpa!3xjx`9pYK{x16G zFIspb$G>Iv+u!B*e+_kPjDJ>w5YK!3tNu)WKt8~}zaL@6Q#K>K3!u_%LAZQ;94tKF zi|Z?Z1BLseg{#WT>oLT2>f%ozd=hX9@TM-F;=!uB*OyTqwjrGz-~hM^dEB^q0A9e` zg*cV377uvY#{bt)H@^({2*7r&1ghTZU4I8<{4U`40N()oKHv`k`ZDX4VLad18W@4j zL9Hh$63}%LLg__LTiWrK^X(o<8{IGsYi8tvm!LB5$d5 zTwEjmUg&rUS@+Y>{4!{bZnQ>5#^f5Sf0GG>sWzxYV|kpu{{6s~75BvydO!}>M)h7* z=Ft}3|5uQiIv$S*@aBQHAN7z&j|+=Q(33+bE;ZwNJ&^h@?NFs}%0la$KE`wA;Sm9z zFl?T@7yu>HQs!t+8ap3oLI3|cil!XoF@&~`ixJ?b)loY7v=p_^$AO#wC|`hQtzWKNSlv3KKrCfOPini zAp1S-K-zzufD-_v|D8to41jtd^*{26diEc6M7{n;dyqPyUjL&#sO&%Lg6{y{1zZF8 z0DeFKK)sOqUpJr!K-&9oy$-km=m!h{1_3t#Lx5X=VL%uV0gM1f0k;8TfIEP@fcF67 zfUf|40q{QH7XeW~3=jt-0II%H2u}jifP01b46ajvX+Rb*19$+)0mvt30ds(dfO)_I zU=i>E;1OU6unhPmz*hku0yO?Z-WLZxdLWWbaUt^GO(>@gz!8K?-D3hNEG8}4C@7Ce z8I(aiWI=OSa>9q8C5}+N1Nw()Hxen|M7{KU&QdoQ5>mgQmnVlekAfF>18)ZR`LbFF zfHwNalJdMNl`gj+|JcR_^yqV0yyqO+RV(?nY=Z=1=RrXhbfkebEwQg+Rk`T{X)|%m zvF>@SKB*q+#Usx)?Rh=@t9mKg6GQ)7oBnI)e}?||JoUd?{6}e}L2yQT!z&$K;6IfA z^dmRQfAst>49=F3n!d*4G(I~4j+a7gPGZ)cRKiZ5aGQzxgz`~UPE{I9Tj4_zjN>Mx z&OJ!=6mXUE_)+OW($ZBsQ~vD7L+V0}zW))VrB9nj0B_F`kcZZgh76d0iV7`VwKL>z zk@q)>Utj+N&|XGFC!}s^J9O$KVKv;0hy88Zf-CjCM)ChP(tcEs|6xeKctO@u=FaU z4n);G{tzjY{_!3(&II0j7H^eL z+n-@Qur2lX3>*5tq5oIwSBCz-HvU^n{%(Z+Ukkq>|2@^ZeKG#aF8}G@jzONL@T26t zEu{=)8*SkFM`sKA2URcnig=Xcr*ut%hWqetWFhTnbJwEd9ONH;P@H#cRQ_>plRgq2 z<@o6jpx%<7d6+Zm0J5u-9zagmGEm`h6Jcc$n`L_=yBow-#~eX0FAys zO@D>o(El3OKVL-s&yTSd$7rMdqv_R&qNZKT?n4)n2lapUJ9Vh|T37n(=(pujuIDQo zjMQXcoz)wMus>zLZw9|wqd@$nGcNh!yZ3?fl+#9P=%v#i9DkjNH~}CHxYRvpt1A7! z6n_M*Fej}H;^%s}oSd0^TJKj#=>MZVc^1$pe(Llpe>wlr{ExJAw3To^yz>m~V|qW8 zm7? zItwd!26(hJe|?}~x=;i3N6$)Wz}0zq%mgHLYb4?SHPJpg1!%PXiC5ttLTQ}m)n-50 zyU6WJYoZnfS6it6TJ2B&_cZE(eV_i9dOmnH{yDGH==*O)+G_HD75^eyn==9#R#(+y zt@Hoo{eJ+pKP6j!5xS687xcxK_PSMaTABZ6-{)Krk8=E#^&dSYT0V7lw9x*XuTk>9 z9KWIey#J`G*UeuR`LFD7-K#ehWdGs%w1Bvb^=)d# zAdm1AZ0QVs^e=03+~csL=vBB6YidUNooLOEOY3(Lu~CG%4n2=uUMZv;N8Sa*Od&PP zu_LDZSgZc`{r_6^g_M`w$UWDc5qPvh3;Nj(;qCar|D^wJ?%F3mz4pz;Pdoob6;!Dc zYN(3me?&;bk4z@f>67)>gW7vv+Lp7JOQ#2Y2KCN;mYeD)IUm7p%ptVs6-a-!M)lHq zRnnyjNw2`jZM2|kl6tKQf6KH{ohdIJ9OD&e?~+|EUaU5@$m0#Ci;Lo8==5BaPsbp) zWJE9!=$^}?VYzsH2u{)w{It63wO~b{{%0=URSp^B-x&X8EW#N7WSSH?FTwcN^9p^K z0>%N};lt03U6g*Tg|p#4i1RY4XBcdVGC3?x@BEqX!f*b4@3;Q#o1g9fi`x)JVd0rL z@SV@UbG-l0|0wa7-#Gr?UY0h2GU#3B+_E2e6Nr0T?jINcYs=tCS~5EBLz+d*OmS|8 z>FBfMDt-sfk1!ix!_24^KOeLLFZ2aJD09gWsdi&uxEU0CkkW-vtv5+PD9Jm4cdV-ZIH#Dz%KQkZptm`IH;RZ()GyEHp#OOA25+IpE7zZ@m;Mc>@Fr@F6#78x z0I0P!KqYritZ(bptH%KPiCahKDDLXl=JRZC7kX=b3VYYRCRb+y*4`V}zy4}b*Gf<1 zexCL1iM1$ftrtG8Hg2p3YMj`I-s;DgvVh}Sz`e{e%rQr<8K4muZaqu9s|BKki-c4cF2V8_7*uYl-!wu$CsVN?l`if!32Zin>-L zk*0}l6oswzLT$8d6pgEG+!!y|0a@*n&cQU+H7B8kO~8Ln`?X!Ji`MriA8gD;*h2wW z*CVi}S1o#ds(4)HQP+B}TTeeiEehAt>o$tUW_z8X|Cf5QNitz z(*F(lU!B)A#(kfcY%t`1H9x|$;>7DYrfbpIEGJ%z{O5N-_Cr@NiBCMqlvsZl^stmM5kslN&7fU>QBeU z!?U@$_-rJZpUrng;zKt_mX;m`y1N~2zu#(hI-Op#!ygQpeKudW+2ZosE&hPZ(d`N> zn?OE59_ede-uKuo{9WP5WvgrjuOn`8TVh^wB4&x19S*D0?6q61=2$fDNG2z2F4u%} z*>6UA8yl^$GNgx1IP7|%g;@!;=Z*4ev@XI?+cIr6A30=7Jy;X)( z41Hx_U3trb}4zClQ zOWsKad}D**VN0Jcmv_Wnw-_-zeQU&u)PaS2^AA0DZjCVVdOS3FH$Lz41@i;Abq9U% z#KQ+Y%n+Omj|}@qgOfwkcdriyvIFy>zOi1%gurg`Ruq@bGnO@BP6@PaqKg zz&$rK7M_fTM&b*XX6ItVi;i3_A0A7LByRTi-^kq!%(z~^+| zznOH--AX+0-U(ky=6s%xPyI}}=&yfoq~;PceXLhscx3eE z@C|3+PG28C6jyd|uY;!L3(<@D;=KFxWafQC7aE2*&|hLpu|mqf@b=V7dvhuPFVh`iis zxB1*vxf6|c4l$K~8EzOW%J|;_?}#nC!iB z;uI<^^Bdp$$#bv2lUIu?B1`vqK9ib5FVK3M6{{W`g_RGSUker1MYz!q*!EuZJGQ+U z_lExW^P|Ta`d>YDS87m({#V@=F!aBIL2BrKhW=;hfA#f02Q&h%qU0(DhP()Sp#`>= z=waK>>*trWJ%RksqBwLlrO)+1XXE$#c0doAfHp_(XYNrcJZRY03t>MdNA%Acm&hGZO9Az88F$PC~rRXfrL z<-75%n0Hz1a?tNK0jjkXr|P?Ue3uV&?-D3H=NAx?m_yqQD!TDwDb%q72%Di-IT2%( zRK#SM`o0ZM9f;#fCy&(gLrCpJ&H(NMpkhyN47sR@CqN~&Z~fYQu2toaC8$v4H9A)D z>hU2^P0c)m5(n@W{7T1^d>ei>V{bdZpg`SwpDv|Mm-0o`|8MjxA29TPso~eu|Bdla z9`^E%fAT$Yiv8y~%gBvI+IN5W1sHCD;5UEhbI4(px8n5&cJcedzpaklWjFwj#X;uq+PkEB{B5ym$>5?D)lj z(S{NzUCg+;aMdu-he6AhUIaVNX1tLTVfsQ`fVjjGL(H-`EKB450j@-)?4T!x5`uDx z^afCtwknNS`8MR>Hu;V&P)m#2j~^wQ?&9W2+ugA+Bq62i%YNwSR zL_ST%I3;Gkq-z2cu=Xf{H2d8ToZX;?a*iu-`7V?+%cY)^tt-N0-d1#`Y?IEE_N^vH zZ|7+TPdkeVcIp%C;^3@fw_X%h)nfDb#`&Yz)C!hTD z?f>n)@ZEPGw{Mk?4;J$u)Z;u9!Uu(!{c!R5VLWeR)YB+s$|J>;M+zkgg`}hSs6+n< z{d)#q&*9pc@?DOU96ai4F=L-`_Dx{-D)+l;ds{p4EoZj76@EINc~l!Cr_q|F|G<+M zmGbMy$Yos**8GFPvo}5&YjZ3QPd3|wjqz`c{|y}fc6k`%UrH6q$mc!&KWzV-^I!c) z&p$X%z&V1bq>^2LRkP4IYheLrq)d+?WQQ!8fZVZ(tGy27p+(1e2--MIYe$GO z)FDfxwa1buFNw#BXSC_!$iq^iGUwa9ES2(%@;8a}W~AU307wb(QQA?X@XB(jZ*T@= z0%t2qB~>xpO^A1%om7>Qb6ZiiP^wCq*j|ikm*Qr-7QG`Rc5eL<_%;8QhnpYO^~VT5 zE+m4meWk_uQ-$F`OIJD(t#SUFI*9xPlB6|S%Cfvh~T$K0{+P@n*JpWgLUL4LP(hA@l-IzGgQSI3saqwid zXZ%uO0{JJ!q0`mU^a2O}-(wQ#UOS-u1BZrH`H&97LlT#qzyhA&LV9uydX%X7lQZxs z$3J-jpHg?{=qKmlzF=At{YHE8&5QF6_6ydD56}3|F6#fT z^75bG>6MEEKXWQ8b6Q;JsGjSh)PcG8oBO^gr6{*(`*h2m!QPO>J?n=S9pwh!oBfFr zryDiPd2!mP%fgJ(*3Zk>)smO-lCXe^_46`XbsoP;zCoLO-nr{0`a&PZMIXL}djfO+ zKJ>@K0fR^M?MWQ-5+}Gs!be>^+FQAD)iR|hpj zFgeLkI`2UDjGWi77JIF&7_zSj$CKetkAM85Ti<(^#W{<`ISc)@cHTex^{&7D;h+BJ syFeoQyQ`SrrSI= Date: Mon, 27 Apr 2026 23:07:05 +1000 Subject: [PATCH 10/24] chore(example3): untrack .project.~u binary (now covered by .gitignore) --- example3/AdsGo_Det.project.~u | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 example3/AdsGo_Det.project.~u diff --git a/example3/AdsGo_Det.project.~u b/example3/AdsGo_Det.project.~u deleted file mode 100644 index 18ca2e0..0000000 --- a/example3/AdsGo_Det.project.~u +++ /dev/null @@ -1,4 +0,0 @@ -malleblas -BOSON -28212 -639128913806457816 From 3da2850d5b315abb8ba7ec2e8a2c7c1c21414181 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:26:31 +1000 Subject: [PATCH 11/24] test(integration): add TestSymbolAttributes (initial) --- test/integration/plc_test.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/test/integration/plc_test.go b/test/integration/plc_test.go index 80f9158..82e9016 100644 --- a/test/integration/plc_test.go +++ b/test/integration/plc_test.go @@ -696,3 +696,30 @@ func TestStructPacking(t *testing.T) { } }) } +// >>> TEST_SYMBOL_ATTRIBUTES START +func TestSymbolAttributes(t *testing.T) { + client := newClient(t) + + sym, err := client.GetSymbol(plcPort, "Main.attribute_test") + require.NoError(t, err, "GetSymbol Main.attribute_test") + require.NotNil(t, sym) + + // Expect two attributes: a flag-only attribute and a key=value attribute. + require.Len(t, sym.Attributes, 2, "expected 2 attributes on Main.attribute_test") + + var foundLinkalways, foundCustom bool + for _, a := range sym.Attributes { + switch a.Name { + case "linkalways": + foundLinkalways = true + assert.Equal(t, "", a.Value, "linkalways should have empty value") + case "some_made_up_key": + foundCustom = true + assert.Equal(t, "some_made_up_value", a.Value, "some_made_up_key value") + } + } + + require.True(t, foundLinkalways, "missing attribute: linkalways") + require.True(t, foundCustom, "missing attribute: some_made_up_key") +} +// <<< TEST_SYMBOL_ATTRIBUTES END From bc60bf919ae0079cbd527af23d55f1da2b99084f Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:26:31 +1000 Subject: [PATCH 12/24] test(integration): add TestSymbolAttributes (initial) --- Makefile | 8 +- example/.vs/example/v15/.suo | Bin 41984 -> 0 bytes example/README.md | 211 - example/example.sln | 86 - example/example/example.tsproj | 7915 ----------------- .../example/smallproject/DUTs/DUTSample.TcDUT | 13 - .../example/smallproject/GVLs/GLOBAL.TcGVL | 33 - example/example/smallproject/POUs/MAIN.TcPOU | 57 - example/example/smallproject/PlcTask.TcTTO | 17 - .../example/smallproject/smallproject.plcproj | 94 - example/example/smallproject/smallproject.tmc | 1 - example2/.gitattributes | 1 - example2/.gitignore | 92 - example2/AdsGo.sln | 131 - example2/README.md | 212 - example2/src/AdsGo.tsproj | 51 - example2/src/AdsGo_Test.plcproj | 129 - example2/src/Globals/Global.TcGVL | 30 - example2/src/Lib/TestStruct.TcDUT | 12 - example2/src/Programs/Main.TcPOU | 52 - example2/src/Tasks/PlcTask.TcTTO | 16 - example3/.gitattributes | 1 - example3/.gitignore | 92 - example3/AdsGo_Testing.sln | 110 - example3/src/AdsGo_Det.plcproj | 107 - example3/src/AdsGo_Det.tmc | 11 - example3/src/AdsGo_Det.tsproj | 39 - example3/src/Globals/GVL_Test.TcGVL | 36 - example3/src/Lib/Deterministic.TcPOU | 150 - example3/src/Lib/PackEight.TcDUT | 14 - example3/src/Lib/PackFour.TcDUT | 14 - example3/src/Lib/PackNone.TcDUT | 14 - example3/src/Lib/PackTwo.TcDUT | 14 - example3/src/Lib/ST_Snapshot.TcDUT | 40 - example3/src/Lib/StructTests.TcPOU | 43 - example3/src/Lib/TestStruct.TcDUT | 34 - example3/src/Programs/Main.TcPOU | 55 - example3/src/Tasks/PlcTask.TcTTO | 16 - go.mod | 1 - go.sum | 2 - 40 files changed, 7 insertions(+), 9947 deletions(-) delete mode 100644 example/.vs/example/v15/.suo delete mode 100644 example/README.md delete mode 100644 example/example.sln delete mode 100644 example/example/example.tsproj delete mode 100644 example/example/smallproject/DUTs/DUTSample.TcDUT delete mode 100644 example/example/smallproject/GVLs/GLOBAL.TcGVL delete mode 100644 example/example/smallproject/POUs/MAIN.TcPOU delete mode 100644 example/example/smallproject/PlcTask.TcTTO delete mode 100644 example/example/smallproject/smallproject.plcproj delete mode 100644 example/example/smallproject/smallproject.tmc delete mode 100644 example2/.gitattributes delete mode 100644 example2/.gitignore delete mode 100644 example2/AdsGo.sln delete mode 100644 example2/README.md delete mode 100644 example2/src/AdsGo.tsproj delete mode 100644 example2/src/AdsGo_Test.plcproj delete mode 100644 example2/src/Globals/Global.TcGVL delete mode 100644 example2/src/Lib/TestStruct.TcDUT delete mode 100644 example2/src/Programs/Main.TcPOU delete mode 100644 example2/src/Tasks/PlcTask.TcTTO delete mode 100644 example3/.gitattributes delete mode 100644 example3/.gitignore delete mode 100644 example3/AdsGo_Testing.sln delete mode 100644 example3/src/AdsGo_Det.plcproj delete mode 100644 example3/src/AdsGo_Det.tmc delete mode 100644 example3/src/AdsGo_Det.tsproj delete mode 100644 example3/src/Globals/GVL_Test.TcGVL delete mode 100644 example3/src/Lib/Deterministic.TcPOU delete mode 100644 example3/src/Lib/PackEight.TcDUT delete mode 100644 example3/src/Lib/PackFour.TcDUT delete mode 100644 example3/src/Lib/PackNone.TcDUT delete mode 100644 example3/src/Lib/PackTwo.TcDUT delete mode 100644 example3/src/Lib/ST_Snapshot.TcDUT delete mode 100644 example3/src/Lib/StructTests.TcPOU delete mode 100644 example3/src/Lib/TestStruct.TcDUT delete mode 100644 example3/src/Programs/Main.TcPOU delete mode 100644 example3/src/Tasks/PlcTask.TcTTO diff --git a/Makefile b/Makefile index ca9547f..071f459 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ help: @echo " test - Run tests on all modules" @echo " test-root - Run tests on root module only" @echo " test-cmd - Run tests on cmd module only" + @echo " test-integration - Run integration tests only" @echo " coverage - Run tests with coverage report" @echo " coverage-html - Run coverage and open HTML report" @echo " lint - Run linter on all modules" @@ -45,7 +46,7 @@ dev: ################################################################################ .PHONY: test -test: test-root test-cmd +test: test-root test-cmd test-integration .PHONY: test-root test-root: @@ -57,6 +58,11 @@ test-cmd: @echo "Running tests on cmd module..." cd $(CMD_MODULE) && go test ./... -v +.PHONY: test-integration +test-integration: + @echo "Running integration tests..." + go test -v -tags=integration ./test/integration + .PHONY: coverage coverage: @echo "Running tests with coverage (root module)..." diff --git a/example/.vs/example/v15/.suo b/example/.vs/example/v15/.suo deleted file mode 100644 index 192f1511dc548bf2d946ddcc4202d3a2b70453a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 41984 zcmeHQX{;pIRj%h{yxVc?IL^d&o*mn9-0tbEdb8t@+IrvjZodI~sp`G^z23V$LlQ^; zf%pMJLIi<80wEy$2?;5qBoYz?3I4E12oMN{;20cawBvBVd zfIN?P)a_N~zOB=i|0FVdp9T(&C^JMUEvAn5C#WuzEW)R!MLY6J$>39tOPXYAj2jKoVfWj#4!vJdU$lULF+&>A><5RrP;+fu++;qGE z_p=Mnn(x8&RfN3;cpdOLz#D+i1A+hp;4Od|aFF7I4=i|gt@tg5yAk#_;2nVXn0Sk6 zbhi)j{eS>~-YbMV^&1M0;vNHhdj71Zxzp|+=J@~E^UlrqM}PS!jeotr5)IMm0QL2! z7y9)l;C^uaOkp(s^>j4;i7x2lpZtj~JPx4o{~Un)C>@Re%kyXQTRk@8f3-$#{qtAR z9zPBE8Nk;7UkCgw;O79;W(1q#?yZ4M``^87yUv@X!E+MVTVyKWbt~X$G=5xW%HT`; zpaRDqubhGZCYqw>dQ$l($pf#WeBvoT1)%rU^F8i=7Bhb9K!-$HA6&>Ah(r?+1HZxL^d;#(Y@dG4B ztXu!@BQEjwbfi#jALWKn4}J8wBvS)EJ-EuMWOPywB>9JAk<+~Y4Dl%q9VwKPgv{G# z!oZ}1mOkC_>|FlSbsy`bCJCGRD;+Vkb(u+{e3CksN1qns`0Gpa@`?XixBiJ|dxw-a zIFcy6JTG^o_C>y3~87;*yUpi<1&!OkFP<|2lHF2$? z9-@%M^>Wu~f1Nj7_x-N}?+(2@j`yH(sNfw3YOlKrJ&69Eq!H0V$gd0hNFSiphL)DD zu5-TsK~86P>3x6Q_g^e&Gyd=G@lSJs4m6MGZv9Sjq3&M1lWvG~AtWb~{6{)HnukeN zB$-dw1yLH3`AAPf^52VqmjIsuYy(~fkSdU5#iQiEHxZ`me~fTn0hj=!3nF@L1=s*I zN814ofD=G^p+)`A7x4Tp;ERAC1AGa<0eFA_5CIav10Y?I{=TIDAsrOyf5LNrUH=ou za{`bAqyT9^29O2h0C_+G@E%|X@DqS911RsG#Jvb80m^_1Kn5s)DuC!~9nb(Y0WClq zK(wn1*ahqXdH|x61Hce40*nC@fc_4P_n(^ke+74bPI;@yrHj-ZU_sQ5_(4&nc!c56 z2l%h8*APr?yDt49{Q$Ka9jo(2%%qe++SHtkJPtehRHHRQVuXAKp_rvzzA~Ej5h+P5-RxA$9-b z?$j6b@Oyp!*X!XtcWQV2I8Q!jO{oMhjOI)iBOj=DnrRoAmK;?-$RqeB3dBMFE~tD_CZH({a0JL(GgM=h7i zrsJr1i~fuCPx5UEHC@F?oWIuoB#CJ&VH{}QF6xJh-TJWT4Z(#r~#A zV44g-GDuAAiyh!q!JJHefqE&;bO(oC{_F5s_x&j~^%pwAn7z}W;H$KL8zt7!Hml`n zsSd8Be^4uaemMv^+I1B{*YDH9PeXsTS($n%&C@j76ECCH|EqAX`~E+UxVrqS$)8m7 zB+t>d`rrKsrq@}wd|Fd8QzyWYL3^g~MnnZlxK7X#)DKA(EyH!vLF4a9 zL?V84-ST~itM@c!CekS^@V&kSjU#pz*;>Nuvp_W)MNzJmK}>Au{H^}0&ECBL>K z%Khe`yStNY7h5g(HstakHLiEc#lem|DYkcsrB{!u#UK5|U;p|)|Cj!}?wtch9?Vll z;NyVQBf!Ps*^Cx7LNX#ZhY&kBZV}-ULPX{|^U`Ii*VcyrNBfigiLUR~WuH^<|6AK= ztUHzezj^+r(Li&-Ni(0;L$}W`|507(^4Dtlq+OKJGn*L4U5sFj6Vu8%?E1!h{v(~j zy7Z6cK7HV=mQV8m%{%LAAW8nEa`odd99R8FSFX>$hm}v%j;I<@#gp(M{^v8uk901C z!)jTFJ(Ip(FQ53J`BZ#Z)LZU%5oOO=sU=*`TKXYK2J%vsU=lk4|?>$`uQ z`qi_}Kd)j2SzbZvV;;_6mN8?-xuRZ=!|lB7FYokeZr#=9)}2^1-QNjw{>YV78SZQE zo9Bm-?kg8P?D{qHTjpz?VyiEI6}X;u3SU9Nn+f%IyrC%1g@6Q}PL0HI^|cyy-uBz@ z|L5laRUP)7%KxvkcEKU-K(ZsdffmkXX?Zy%;dJ2+l3@!N%QXZX)8ZDtmTOI$T{~+Fz^kF2`pQM8!{THq8 z(YoHc{O5y+dldhFQ2rFPK-vbKQ{S($C5O&`zjBK5m-R2p`p+=xu8mSj)38XJ4%595 zB4@GxA$?hj6608{|HI{cQpUc zeB0ol- zA#D)ZLFjYdJUyhxusRpj5u)jjE6gYM_0P|}L^fj`*o>?ve;%%Vm3OqMdeH*%IQf-T z^{f_@tiVP1Q+k4w@b(U=e)~If{ca|_hW2-*>nw`0R|f4eRmG(*bcU@KnXKSg)gH?` zC**Ky+4HL?<+cmJWHh6x$K@-rkZ@(GUPAR!uh^Szhl`zJRqmbo4Zn8&Hx$#U{thll z(%{RG^5H%;9$!8`9_Q6|0E1Qfui2q)_7R;8n?W zl3X!QkXk!IK$lmpLB`SLNL|*^)?>7?*OY1eC!+YLXi}YE|H4*T6?w_rik5$=%MX@B z-Vu=6QPuE^BJWYCE~njDnG{!_m+P8vdgbKWAlpKU>Lcaq;%VG}I^MOIhTQ65#o8dP z8A@2y6xI37g}Im35os0ChSP|7&VzZ@4POV=8Qt*b5lZWbN#@nZe#jYq>Cb$B^tXTT zoo9Y83t=|NxRhuA{6~NOQs{Sov+{?(_R@d2si5}}pGR4=O6kVRq*f}~?t~#}wov(X zq@=H|$@+f?saMx2kkuy1O!O5mi|gSzoelphXyEZmxti7CVyS@(FExPaR= zeQk??mPj$%7;kia19CiZ8J~wHKtb*4vKf!G72tGGFQE?|!zgNvFyw%17}#3Zz>=(I zFShkgsz(9++PQ#d22Ur~=Iv~68eu16=)3TmJkSK3zc*fd{T+whS$bmdL#@BF^}^fL z#_RP!jS{=iTUpE(Zcryyoj*8resHKW38z||7!hW{oIw=d3VOzaqG^^iG?SQB`<3gU zaO+dzi!Ajd3UXRXto8ldgW-BDr%_=I!+VPV`!)vs)*L=+{NJ&f|69WOsr=vi{M+ID z--dtN@NZ|A9-!6vpK8d=WjS6czi4T(#K8qx%QR0ila=lTy9wokA*sV8}bk89tv^uR|Ul5nuJAr0sV{Ez@$AASG*F03@juKT$1R;fPO{+uQ~eFyXm z%6O3Z?w0tr8Rz>hmbJKfRy1;Mv%|=8PRYny%yy&I#XIbFc$z(~>(}P%bIazpOAB?o ztumSAUb~2u(bbi%Ywwp8g>{xn7Ngy6cN^JKMK%_#Ma5`#lx*fw*}*D~^7X&@D8JL8 ztBBX$7d#%;$@BV)@uFnptegig#@o!i;9xxt;rj32sux>(*>z1szkjO`y@+0Qv#Iu) z{px!k<+oZIgs>vGMoZH!^c~4#^w_MDk+r*AMwe*ejAnszSe>lf!;0*6Xhyb3J3>eO zOLrqVxWtHeEk$@_-yUK6!1bO!oEQ7V)!f3^+3=5K@2ao5on`jET^!nme>`jr;W%Dt z!#^IkvZrzU#6Qwr07hILSdr1cELN~`LlyyL+@0z=j)L_bn>ty@aJkiWY6~m^?#CD9 z+85dnyzvFB3?IF-0PQ{f@{8uLH~z2t(ElQ*Yrpl!e@_|Gej=v-`PyHSTc41&E^E8= z(YKLptQBcrpVQc_GWV%pX0yPyg4Lwc;a|qvoCkl}JO7K!gHI-5u~5P;QL?(1;3d~G zwzPWyeI=n;wP<_D_3;)y)J`8-2(o%8so@Vjo`IWo-lH!q_6;u|Pz^61x-`#$YECOz zufKo7N2R}*|N0N9&Wtchs{h68U)QNW^;`6_*eV{zz5ezC`X_ZOU)rgUde{}sajl-= zqlvLO=&g1+9Fb(YCZ(%z@$|^W1ujo_#bt8W$id|z$%NU@_4;ht5hssCC!V$-wlHao zN3MK4O`d_WR4bIn94Gd}cyx+fxiZ@GQUWQIOegq^Sc`QszCk@7A4|M7m-W{yR{vgR zD){%=9R|>Z^)UJKoNgL&G@l$}~LAV03Di za-n{077f>P8Y^XD(18mthuz3iiDbJpVjNLj%&_FG~##7rp`9& z9w+Qh&h1uGa;6|vrJOMISqHI#)J;`lDW8&Xr_AkSIXn<+HxxallqxFW)ew}2*`uzv>!SP`aoFDAV|Nr(;mTAr?|LaGxZL}a5+pbd?d^a&e&a>Gw<_{p_&_;)2g zxt<{AP3VHyBolNes}Wubu%V10p6N9wHOa}x`yt8I_qSWSTsN4nwI|I$G8?RW*l43q$h^Nxoiq~)UHlyWXkn4Gi z9q%Y_YghS3wNog%@`hSOumz*#Y`QgRHza4EmlqAAVL#|Bbdz1h)(>|*Y$zV66eYV< zj5UJZcu9%PoT8(W^>dDDVsCe1Dh9-nw-+e;cPp9NEG}EC)kw772pHO3NiLN5d`j__ zYKd-7_Ov_UKsOZNLXza(jg-V*J35t$)ns$iUUyb|6$W*wZVK}u$4If|lOj9yMRS(i zM4oi|lQtLR45d&t5)4+9aj?^Aq--IFr|Ae+I)j)}S0*8s$37PA&}x{a#w;nfdfc?T zXOASx!(@N#>PdoJoMqd=cutU8!CHL8=UlbfwA5*HReLn&8%ulfkwbPXro4-Hakgn9 zwVU(jay&{5_!H@ zoN~>ACn0vLjd-jP>)G7pv=?g5NSX78I3eHc`=wdGTHrXpkCVN#d@t5bDKs^!!#Z> zM-rg|U#cbj)j`};t;NUof#|U2v(-dgv}T9AM>O~wP`}o4O;g@%4a7s8-MDu)Weuaw zz%07Nel5$({z6k6h7uL44)`>TOzT&a2{!GWj*tz3R8 zxxD#==(M}bCV!pxIQ*jEj7?LXF<+a>ICv6)Y9!`hH{GoNhclUq5T+*_*AC$vc>+G*80^3|m&M_yWuxthEP z{&;15=wI%?UF&J#30DJWY*NTd2;T6qqpY`bCa5vEA6IId;Tt%Jg2+TX|&qecqWr^K-(}z z>|nT`Z0{8kdB;o{R^^z%9`U9pA<60wR|U@QY({1KFkabn=aVM6$4NQMWUua&q)Dw2 zu{6gm&Nt@wGD^s`R~=S%{Ul_bu%OHvlc~2YWXSAh%Vwv!PX0aGc z#WE|)iq+vz?AOJ6Zyo9>Z8>WDz4_>TQGeE#s}~uUtLcjvpEs?i{l%q^_6YU0^%2_0 z_$Nh6B;kp%$q849B+Hg;xEt>ThwZpCm!4M5Vdt=&@_XuaVHAUPMz5b!%>0N?NCG?L z+I%>{OC4b{u!rMyM=p@@SK>t}EX5~2XD1gK=DT|XL&#!tHf*+0EaJAiXU@`)wN(`p zR}@o1&EOd*;pwQx)yFQY5FU+Fu3*;IW#wkaCt7@RqLHzN!w>_#6;qdQgrYe|y)X7= z2Dx7jCJj(yW}=gDxl=bc{I-635OB520hS+iTA{YxrxbbXZb#&7t-NnM4F~$IM$6DJ zwIfc;tU4?NTj8wCo5!h!D^d5k?M1saSPoZJpgaLO+TF28-6tM5(CsYWZB zP329!;vig%1sj8Q!0y}iapOHtwc5$M;XJ-Om#^Y>dNRR~so|)##`%sdm@W_7u02au zu=;Z`n<-K-l*@9@DhqvKWVOwvZK3G%mhFL|WyT7is+HcT>oyH)9wpzAX2Z#_8L|cg zN+>hV$fHg*6XPQZgU8%zcY|CZv}du_5)&ojil!B@>ByAE__v1~uUo>EVQ`Xd^*ob) zvEgvagM-D0|)s1)LRnRq-=@FqE#ONIvqcP{KT@$5R(kM=dz_R67u?2&~Y z?cT$}%FTjrOdPP&BbOU)H*ED@e)E>v&%N@6{T+q%y?itaxC8sO3$&br6`+K@Bt+~j zLH}qGRog|{mBOZ4EYdC&rMVTOQ{98Y2p{?<3ah4|JEx|$qh=mnvcr4i^(ZV2Tk3v< z^8R0L{P0s?ho}9yhOGM@1rBcbRgf$Fm4@6#)hbc5sic3jSXI9wuq&$A*l~BLZ6d?3 zgtG#F7C1ci=t0hpt2tW{kMN{#@wNZEIDtF;hlW*iA!|)HP7iXVy*4DA)aowWDW!nZ zikzQ#Ub9G~zv6V%eQqnTL9D^z@X05s4n%yHEy2bz$vkz5Y%B-N#~x1MUzRcWKK*zU zp?>@!(~p1g-0S}jdKLz%w14v!_TfFtj()l^+*$v>aNhqHo%jDiE%g2#dcKT5o5t`r zJ^GXNXD)m3AI&IwDTn(NSm=gf6-%RKz-*%*Yh%)aUP}K^qMoYtP`BETop>S(V>f#2 z$@FXSyE*M&bu>!L7!CSgv%IjSrGKoyf|3=CE~18IxLD8#8Y3)5M@21}zGKv^oNX9Y zJ`v0csU1kgKBFw|J|82d-ybdfpI4KvZRRL}z#;9Gz znXo9SZo(jxVDUMh_C{8eNI4Mp6qo9Y@}j-Ksm@BkoNTSh zMx1CBeThJCMYhysHSCS~?yR)8!(scletsd`irzsqW^td_H{YZ$k`MkuNc)k~j_CA9 zFR}pdfdc6*Y^M1kKzjYz0h!e2l=(~fgS;3dNM=G|NE>id`xUqmRiu?<(E zlrF$^#)#Z(@Ra~`wc$;vXS#4|xe16z{gy`<^%|;u58@IA4&+6Ym&Zx1e8p#nKecli zA%r1q*H;3_a8dn|Kedn>d6A!t+^H>Se$aXjJv$f^wg4nc{32q|j8an5Yr85@PPDro zVMS`g_s!uUoQ|L6$gcjxD#mox!;BWK_INybLb-pJW^x}1F{ z>wif8(Ds=<+xLI^_h*~$_tyJi2v9{qn;xYMa~o{o_V|173Zj zztJVF4zv0H^XmVfZ@2zuqrchcZ#MdydslyBhK7o?sH8O&p*_+xfV3uHh1Q95K?-y~ zq*WsQpr%hHU6luVDbhlc9*VSDMAxn_?>F!W{TAw>{VfO{n*aN0i@Xu`=;f_%Jf{6S z>hb+Zk0X*A;fZ~(C+6uMpma~(V4nKsPl2zYhmS2jJiYkvas2_mkOBr<#%FFY&wf+Q z_!IlC=WZ~c{N}@0?D`h=JD^C8RjPx>vy+W7I?nn6SVuV*I>@~W)z8~RrL{M}7+`iZ6=4tMym~ZSO`T2d< zn>QH4H~-4|ub=wmx4!pd`p>l9+E4%1JiYpA#(i%iywxmkE=i4fWj`kUzw7@23Cv6_ diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 1151aaa..0000000 --- a/example/README.md +++ /dev/null @@ -1,211 +0,0 @@ -# Example TwinCAT Project - -This directory contains a complete TwinCAT 3 project that demonstrates the capabilities of the ads-go library and CLI tool. - -## Project Structure - -``` -example/ -├── example.sln # Visual Studio solution file -└── example/ - ├── example.tsproj # TwinCAT project file - └── smallproject/ # PLC project - ├── POUs/ - │ └── MAIN.TcPOU # Main program with cycle-based and time-based logic - ├── DUTs/ - │ └── DUTSample.TcDUT # Sample structured data type - └── GVLs/ - └── GLOBAL.TcGVL # Global variable list with test variables -``` - -## Opening the Project - -1. Open TwinCAT XAE (Extended Automation Engineering) -2. Open `example/example.sln` -3. Build the project: **TwinCAT → Activate Configuration** -4. Set TwinCAT to RUN mode - -**Note:** The `_Boot/` directory (containing compiled boot files) is excluded from Git per TwinCAT best practices. It will be automatically generated when you activate the configuration in step 3. - -## Available Variables - -The project exposes the following global variables for ADS access: - -### Basic Types (For Testing) -- `GLOBAL.gMyInt: INT` - Simple integer value (default: 0) -- `GLOBAL.gMyBool: BOOL` - Simple boolean value (default: FALSE) -- `GLOBAL.gMyDINT: DINT` - Simple double integer value (default: 0) - -### Cycle-Based Variables (Updates Every PLC Scan) -- `GLOBAL.gMyIntCounter: INT` - Increments every PLC cycle when enabled (default: 0) -- `GLOBAL.gMyBoolToogle: BOOL` - Toggles every PLC cycle when enabled (default: FALSE) - -### Time-Based Variables (Updates Every Cycle Period) -- `GLOBAL.gTimedIntCounter: INT` - Increments every cycle period when enabled (default: 0) -- `GLOBAL.gTimedBoolToogle: BOOL` - Toggles every cycle period when enabled (default: FALSE) - -### Control Flags -- `GLOBAL.gIntCounterActive: BOOL` - Enable/disable cycle-based counter (default: TRUE) -- `GLOBAL.gBoolToggleActive: BOOL` - Enable/disable cycle-based toggle (default: TRUE) -- `GLOBAL.gTimedCounterActive: BOOL` - Enable/disable time-based counter (default: TRUE) -- `GLOBAL.gTimedToggleActive: BOOL` - Enable/disable time-based toggle (default: TRUE) - -### Configuration -- `GLOBAL.gCyclePeriod: TIME` - Period for time-based operations (default: T#2S = 2 seconds) - -### Complex Types -- `GLOBAL.gIntArray: ARRAY[0..100] OF INT` - Array of 101 integers -- `GLOBAL.gMyDUT: DUTSample` - Structured data type with: - - `Counter: INT` - Integer counter field - - `Ready: BOOL` - Boolean ready flag - - `gIntArray: ARRAY[0..50] OF INT` - Nested integer array - -## PLC Program Logic - -The `MAIN` program implements two types of behavior: - -### 1. Cycle-Based Behavior (Every PLC Scan) -Executes on every PLC cycle (typically 1-10ms): - -```iecst -// Increment counter if enabled -IF GLOBAL.gIntCounterActive THEN - GLOBAL.gMyIntCounter := GLOBAL.gMyIntCounter + 1; -END_IF - -// Toggle boolean if enabled -IF GLOBAL.gBoolToggleActive THEN - GLOBAL.gMyBoolToogle := NOT GLOBAL.gMyBoolToogle; -END_IF -``` - -**Use case:** Fast-changing values for testing rapid subscriptions and notifications. - -### 2. Time-Based Behavior (Every Cycle Period) -Executes periodically based on `gCyclePeriod` (default 2 seconds): - -```iecst -// Timer triggers periodic actions -fbTimer(IN := TRUE, PT := GLOBAL.gCyclePeriod); - -IF fbTimer.Q THEN - // Increment timed counter if enabled - IF GLOBAL.gTimedCounterActive THEN - GLOBAL.gTimedIntCounter := GLOBAL.gTimedIntCounter + 1; - END_IF - - // Toggle timed boolean if enabled - IF GLOBAL.gTimedToggleActive THEN - GLOBAL.gTimedBoolToogle := NOT GLOBAL.gTimedBoolToogle; - END_IF - - // Retrigger timer for next cycle - fbTimer(IN := FALSE); -END_IF -``` - -**Use case:** Slower-changing values for testing different subscription cycle times and demonstrating configurable periods. - -## Using with ads-go CLI - -The CLI tool is pre-configured to work with these variables. See the main [README.md](../README.md#example-twincat-project) for CLI commands. - -### Quick Start Examples - -**Monitor fast-changing counter:** -```bash -./ads-cli -> sub_counter -# Watch counter increment every PLC cycle -``` - -**Control the toggles:** -```bash -> enable_toggle false # Disable cycle-based toggle -> enable_timed_toggle true # Enable time-based toggle -> read_status # Check current states -``` - -**Change timer period:** -```bash -> read_period # Check current period (default 2s) -> set_period 5 # Change to 5 seconds -> sub_timed_counter # Watch it increment every 5s -``` - -**Test all subscriptions:** -```bash -> sub_all # Subscribe to all 4 counters/toggles -> list_subs # View statistics -> unsubscribe_all # Clean up -``` - -## Variable Access Paths - -When using ads-go library programmatically: - -```go -// Read basic values -value, _ := client.ReadValue(851, "GLOBAL.gMyInt") -value, _ := client.ReadValue(851, "GLOBAL.gMyBool") - -// Read counters -counter, _ := client.ReadValue(851, "GLOBAL.gMyIntCounter") -timedCounter, _ := client.ReadValue(851, "GLOBAL.gTimedIntCounter") - -// Write control flags -client.WriteValue(851, "GLOBAL.gIntCounterActive", true) -client.WriteValue(851, "GLOBAL.gCyclePeriod", int32(5000)) // 5 seconds in ms - -// Read array -array, _ := client.ReadValue(851, "GLOBAL.gIntArray") - -// Read/write struct -dut, _ := client.ReadValue(851, "GLOBAL.gMyDUT") -client.WriteValue(851, "GLOBAL.gMyDUT", map[string]any{ - "Counter": int16(100), - "Ready": true, -}) - -// Subscribe to changes -callback := func(data ads.SubscriptionData) { - fmt.Printf("Value changed: %v\n", data.Value) -} -settings := ads.SubscriptionSettings{ - CycleTime: 100 * time.Millisecond, - SendOnChange: true, -} -sub, _ := client.SubscribeValue(851, "GLOBAL.gMyBoolToogle", callback, settings) -``` - -## Requirements - -- TwinCAT 3 XAE or XAR (Build 4024 or newer recommended) -- Windows OS with TwinCAT runtime -- ADS route configured between client and PLC (see main README for setup instructions) - -## Port Configuration - -- **Default PLC Port:** 851 (TwinCAT 3 first runtime) -- For TwinCAT 2, use port 801 - -## Troubleshooting - -**Variables not found:** -- Ensure TwinCAT is in RUN mode (not CONFIG) -- Verify the PLC program is activated -- Check ADS route is configured correctly - -**Counters not incrementing:** -- Check enable flags: `read_status` in CLI -- Verify PLC is running: `state` in CLI -- For timed counters, verify cycle period: `read_period` in CLI - -**Subscription notifications not received:** -- Ensure PLC is in RUN mode -- Verify the variable is actually changing (check enable flags) -- Check subscription settings (cycle time, on-change mode) - -## License - -This example project is part of ads-go and is licensed under the MIT License. diff --git a/example/example.sln b/example/example.sln deleted file mode 100644 index 90ef212..0000000 --- a/example/example.sln +++ /dev/null @@ -1,86 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# TcXaeShell Solution File, Format Version 11.00 -VisualStudioVersion = 15.0.28307.2092 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "example", "example\example.tsproj", "{DB567925-AE3D-481C-8033-6FB9C6490B8D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) - Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) - Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) - Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) - Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) - Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) - Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) - Release|Any CPU = Release|Any CPU - Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) - Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) - Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) - Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) - Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) - Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) - Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {6ED517DE-02ED-425B-B7FD-97E5B120036F} - EndGlobalSection -EndGlobal diff --git a/example/example/example.tsproj b/example/example/example.tsproj deleted file mode 100644 index 26e5851..0000000 --- a/example/example/example.tsproj +++ /dev/null @@ -1,7915 +0,0 @@ - - - - - ARRAY [0..1] OF BIT - 2 - BIT - - 0 - 2 - - - - ARRAY [0..2] OF BIT - 3 - BIT - - 0 - 3 - - - - ARRAY [0..10] OF BIT - 11 - BIT - - 0 - 11 - - - - ARRAY [0..13] OF BIT - 14 - BIT - - 0 - 14 - - - - ARRAY [0..0] OF BYTE - 8 - BYTE - - 0 - 1 - - - - ARRAY [0..3] OF BIT - 4 - BIT - - 0 - 4 - - - - FSOE_11 - 88 - - FSoE CMD - USINT - 8 - 0 - - - FSoE Data 0 - BITARR16 - 16 - 8 - - - FSoE CRC_0 - UINT - 16 - 24 - - - FSoE Data 1 - BITARR16 - 16 - 40 - - - FSoE CRC_1 - UINT - 16 - 56 - - - FSoE ConnID - UINT - 16 - 72 - - - - FSOE_27 - 216 - - FSoE CMD - USINT - 8 - 0 - - - FSoE Data 0 - BITARR16 - 16 - 8 - - - FSoE CRC_0 - UINT - 16 - 24 - - - FSoE Data 1 - BITARR16 - 16 - 40 - - - FSoE CRC_1 - UINT - 16 - 56 - - - FSoE Data 2 - BITARR16 - 16 - 72 - - - FSoE CRC_2 - UINT - 16 - 88 - - - FSoE Data 3 - BITARR16 - 16 - 104 - - - FSoE CRC_3 - UINT - 16 - 120 - - - FSoE Data 4 - BITARR16 - 16 - 136 - - - FSoE CRC_4 - UINT - 16 - 152 - - - FSoE Data 5 - BITARR16 - 16 - 168 - - - FSoE CRC_5 - UINT - 16 - 184 - - - FSoE ConnID - UINT - 16 - 200 - - - - ARRAY [0..4] OF BIT - 5 - BIT - - 0 - 5 - - - - ARRAY [0..0] OF BIT - 1 - BIT - - 0 - 1 - - - - INFODATA_FB_3 - 24 - - State - USINT - 8 - 0 - - - Diag - UINT - 16 - 8 - - - - INFODATA_3_0_0 - 16 - - State - USINT - 8 - 0 - - - Diag - USINT - 8 - 8 - - - - INFODATA_0_1_0 - 8 - - Input Safe Data Byte 0 - BYTE - 8 - 0 - - - - ARRAY [0..6] OF BIT - 7 - BIT - - 0 - 7 - - - - ARRAY [0..5] OF BIT - 6 - BIT - - 0 - 6 - - - - ARRAY [0..1] OF BYTE - 16 - BYTE - - 0 - 2 - - - - - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ff808080808080808080808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff007fff007fff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000120b0000120b00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ff000000000000ff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ff000000000000ff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff008066008099008066008099008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffffff000000ffffff0000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff0000ff00ffff0000ff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00800000ffff008000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff - - - - - - - - - - - 2ms - - - 10ms - - - 200ms - - - FileWriterTask - - - PlcTask - - - - - - - smallproject Instance - {08500001-0000-0000-F000-000000000064} - - - 0 - PlcTask - - #x02010070 - - 20 - 10000000 - - - - - - - - - - - Device 1 (EtherCAT) - - -
-801112064
- 131072 - 8192 - 0 - 3 - 0 - 5612 - 20480 - -
0
- 4096 - 12288 - 2 - 0 - 1 -
- 128 - 1024 - 32 - 768 - 64 - 512 - 16 - 640 - - -1350027980 - 1 - 256 - -
-
- - Image - - - TermEtherCAT (EK1200) - 1000 - - - TermPower1 (EL9222-5500) - 1001 - - 001080002600010001000000400080008000001026010000 - 801080002200010002000000400080008000801022010000 - 001104002400010003000000000000000400001124010000 - 801108002000010004000000000000000800801120010000 - 0000000000000000001100020100000001000000000000000000000000000000 - 0000000000000000801100010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - Term 12 (EL9222-5500) - 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 - 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - - - - - - TermOutput (EL2008) - 1002 - - 000f01004400010003000000000000000000000f44090000 - 0000000000000000000f00020100000001000000000000000000000000000000 - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - - TermSensorGnrl (EL6224) - 1003 - - - - GenericV - - Lift - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x5532a948 - - - - SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml - SICK AG - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png - AHM36B-BAQC012x12 - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png - Encoders - Absolute Encoder Multiturn - 0x00000720 - 0x00000020 - 008001D60000001A000011012087000000000000 - - Direct Parameters 1 - V_DirectParameters_1 - 0x0 - 16 - - Reserved - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Master Cycle Time - 0x2 - UINT8 - 8 - 112 - 32 - - rw - - - - Min Cycle Time - 0x3 - UINT8 - 8 - 104 - 32 - - rw - - - - M-Sequence Capability - 0x4 - UINT8 - 8 - 96 - 41 - - rw - - - - IO-Link Version ID - 0x5 - UINT8 - 8 - 88 - 17 - - rw - - - - Process Data Input Length - 0x6 - UINT8 - 8 - 80 - 135 - - rw - - - - Process Data Output Length - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Vendor ID 1 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Vendor ID 2 - 0x9 - UINT8 - 8 - 56 - 26 - - rw - - - - Device ID 1 - 0xa - UINT8 - 8 - 48 - 128 - - rw - - - - Device ID 2 - 0xb - UINT8 - 8 - 40 - 1 - - rw - - - - Device ID 3 - 0xc - UINT8 - 8 - 32 - 214 - - rw - - - - Reserved - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Reserved - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Reserved - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - System Command - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Direct Parameters 2 - V_DirectParameters_2 - 0x1 - 16 - - Device Specific Parameter 1 - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Device Specific Parameter 2 - 0x2 - UINT8 - 8 - 112 - 0 - - rw - - - - Device Specific Parameter 3 - 0x3 - UINT8 - 8 - 104 - 0 - - rw - - - - Device Specific Parameter 4 - 0x4 - UINT8 - 8 - 96 - 0 - - rw - - - - Device Specific Parameter 5 - 0x5 - UINT8 - 8 - 88 - 0 - - rw - - - - Device Specific Parameter 6 - 0x6 - UINT8 - 8 - 80 - 0 - - rw - - - - Device Specific Parameter 7 - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Device Specific Parameter 8 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Device Specific Parameter 9 - 0x9 - UINT8 - 8 - 56 - 0 - - rw - - - - Device Specific Parameter 10 - 0xa - UINT8 - 8 - 48 - 0 - - rw - - - - Device Specific Parameter 11 - 0xb - UINT8 - 8 - 40 - 0 - - rw - - - - Device Specific Parameter 12 - 0xc - UINT8 - 8 - 32 - 0 - - rw - - - - Device Specific Parameter 13 - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Device Specific Parameter 14 - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Device Specific Parameter 15 - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - Device Specific Parameter 16 - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - - - Standard Command - V_SystemCommand - 0x2 - 1 - - Standard Command - 0x0 - UINT8 - 8 - 0 - 0 - - wo - - - 0x82 - Restore Factory Settings - - - 0x80 - Device Reset - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Device Access Locks - V_DeviceAccessLocks - 0xc - 2 - - Parameter (write) Access Lock - 0x1 - BOOL - 1 - 0 - - - rw s - - - - Data Storage Lock - 0x2 - BOOL - 1 - 1 - - - rw s - - - - Local Parameterization Lock - 0x3 - BOOL - 1 - 2 - - - rw s - - - - Local User Interface Lock - 0x4 - BOOL - 1 - 3 - - - rw s - - - - - Vendor Name - V_VendorName - 0x10 - 64 - - Vendor Name - 0x0 - String - 512 - 0 - SICK AG - SICK AG - ro - - - - - Vendor Text - V_VendorText - 0x11 - 64 - - Vendor Text - 0x0 - String - 512 - 0 - SICK Sensor Intelligence. - SICK Sensor Intelligence. - ro - - - - - Product Name - V_ProductName - 0x12 - 64 - - Product Name - 0x0 - String - 512 - 0 - AHM36B-BDQC012X12 - - ro - - - - - Product ID - V_ProductID - 0x13 - 64 - - Product ID - 0x0 - String - 512 - 0 - 1092007 - - ro - - - - - Product Text - V_ProductText - 0x14 - 64 - - Product Text - 0x0 - String - 512 - 0 - Absolute Encoder Multiturn - Absolute Encoder Multiturn - ro - - - - - Serial Number - V_SerialNumber - 0x15 - 16 - - Serial Number - 0x0 - String - 128 - 0 - 20230078 - - ro - - - - - Hardware Version - V_HardwareRevision - 0x16 - 64 - - Hardware Version - 0x0 - String - 512 - 0 - 1.0 - 1.0 - ro - - - - - Firmware Version - V_FirmwareRevision - 0x17 - 64 - - Firmware Version - 0x0 - String - 512 - 0 - 1.1.0.1746R - - ro - - - - - Application Specific Tag - V_ApplicationSpecificTag - 0x18 - 32 - - Application Specific Tag - 0x0 - String - 256 - 0 - *** - *** - rw - - - - - Device Status - V_DeviceStatus - 0x24 - 1 - - Device Status - 0x0 - UINT8 - 8 - 0 - 0 - - ro - - - 5 - 255 - Reserved - - - - - PositionVelocity - V_ProcessDataInput - 0x28 - 8 - - Position - 0x1 - UINT32 - 32 - 0 - - - ro s - - - - Velocity - 0x2 - INT32 - 32 - 32 - - - ro s - - - - - Profile Characteristic - V_ProfileIdentifier - 0xd - 8 - - Profile Characteristic - 0x1 - UINT16 - 16 - 48 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x2 - UINT16 - 16 - 32 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x3 - UINT16 - 16 - 16 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x4 - UINT16 - 16 - 0 - - - ro - see IO-Link Interface Specification - - - - PDInputDescriptor - V_PDInputDescriptor - 0xe - 6 - - Position - 0x1 - OctetString - 24 - 24 - - - ro s - see IO-Link Interface Specification - - - Velocity - 0x2 - OctetString - 24 - 0 - - - ro s - see IO-Link Interface Specification - - - - Device Specific Tag - V_DeviceSpecificTag - 0x40 - 16 - - Device Specific Tag - 0x0 - String - 128 - 0 - *** - *** - rw - see IO-Link Interface Specification - - - - Velocity Value - V_VelocityValue - 0x41 - 4 - - Velocity Value - 0x0 - INT32 - 32 - 0 - 0 - - ro - see IO-Link Interface Specification - - - - Velocity Format - V_VelocityFormat - 0x42 - 1 - - Velocity Format - 0x0 - UINT8 - 8 - 0 - 3 - 3 - rw - The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. - - 0x0 - Counts per second [cps] - - - 0x1 - Counts per 100ms [cp100ms] - - - 0x2 - Counts per 10ms [cp10ms] - - - 0x3 - Rounds per minute [rpm] - - - 0x4 - Rounds per second [rps] - - - - - Velocity Update Time - V_VelocityUpdateTime - 0x43 - 4 - - Velocity Update Time - 0x0 - UINT32 - 32 - 0 - 2 - 2 - rw - The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. - - 1 - 50 - Velocity update time range. - - - - - Velocity Integration Time - V_VelocityIntegrationTime - 0x44 - 4 - - Velocity Integration Time - 0x0 - UINT32 - 32 - 0 - 200 - 200 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 200 - Velocity integration time range. - - - - - Counts per Revolution - V_CountsPerRevolution - 0x51 - 4 - - Counts per Revolution - 0x0 - UINT32 - 32 - 0 - 4096 - 4096 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 4096 - Value range for counts per revolution. - - - - - Total Measuring Range - V_TotalMeasuringRange - 0x52 - 4 - - Total Measuring Range - 0x0 - UINT32 - 32 - 0 - 16777216 - 16777216 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 16777216 - Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. - - - - - Preset Value - V_PresetValue - 0x53 - 4 - - Preset Value - 0x0 - UINT32 - 32 - 0 - 100100 - - wo - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 0 - 16777215 - Preset Value range. - - - - - Position Value - V_PositionValue - 0x54 - 4 - - Position Value - 0x0 - UINT32 - 32 - 0 - 100100 - - ro - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - - - Counting Direction - V_CountingDirection - 0x55 - 1 - - Counting Direction - 0x0 - UINT8 - 8 - 0 - 0 - - rw - The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. - - 0x0 - Clockwise (cw) - - - 0x1 - Counter-clockwise (ccw) - - - - - RawPosition - V_RawPosition - 0x56 - 4 - - RawPosition - 0x0 - UINT32 - 32 - 0 - 2205371 - 0 - ro - Raw position, with no offset or scaling modification. - - - - Total Measuring Range adjusted - V_TotalMeasuringRangeAdjusted - 0x5b - 4 - - Total Measuring Range adjusted - 0x0 - UINT32 - 32 - 0 - 16777216 - - ro - Raw position, with no offset or scaling modification. - - - - Status Flag A - V_StatusFlagA - 0x5c - 2 - - Status Flag A - 0x0 - UINT16 - 16 - 0 - 0 - - ro - Raw position, with no offset or scaling modification. - - - - SICK Profile Version - V_SICK_ProfileVersion - 0xcd - 4 - - SICK Profile Version - 0x0 - String - 32 - 0 - 1.00 - 1.00 - ro - Raw position, with no offset or scaling modification. - - - - 0x1800 - 0x0 - DS_DumyEvent - Event for Data Storage - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - 0x0 - - - - 0 - 0 - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - - - - SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml - SICK AG - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png - AHM36B-BAQC012x12 - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png - Encoders - Absolute Encoder Multiturn - 0x00000720 - 0x00000020 - 008001D60000001A000011012087000000000000 - - Direct Parameters 1 - V_DirectParameters_1 - 0x0 - 16 - - Reserved - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Master Cycle Time - 0x2 - UINT8 - 8 - 112 - 32 - - rw - - - - Min Cycle Time - 0x3 - UINT8 - 8 - 104 - 32 - - rw - - - - M-Sequence Capability - 0x4 - UINT8 - 8 - 96 - 41 - - rw - - - - IO-Link Version ID - 0x5 - UINT8 - 8 - 88 - 17 - - rw - - - - Process Data Input Length - 0x6 - UINT8 - 8 - 80 - 135 - - rw - - - - Process Data Output Length - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Vendor ID 1 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Vendor ID 2 - 0x9 - UINT8 - 8 - 56 - 26 - - rw - - - - Device ID 1 - 0xa - UINT8 - 8 - 48 - 128 - - rw - - - - Device ID 2 - 0xb - UINT8 - 8 - 40 - 1 - - rw - - - - Device ID 3 - 0xc - UINT8 - 8 - 32 - 214 - - rw - - - - Reserved - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Reserved - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Reserved - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - System Command - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Direct Parameters 2 - V_DirectParameters_2 - 0x1 - 16 - - Device Specific Parameter 1 - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Device Specific Parameter 2 - 0x2 - UINT8 - 8 - 112 - 0 - - rw - - - - Device Specific Parameter 3 - 0x3 - UINT8 - 8 - 104 - 0 - - rw - - - - Device Specific Parameter 4 - 0x4 - UINT8 - 8 - 96 - 0 - - rw - - - - Device Specific Parameter 5 - 0x5 - UINT8 - 8 - 88 - 0 - - rw - - - - Device Specific Parameter 6 - 0x6 - UINT8 - 8 - 80 - 0 - - rw - - - - Device Specific Parameter 7 - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Device Specific Parameter 8 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Device Specific Parameter 9 - 0x9 - UINT8 - 8 - 56 - 0 - - rw - - - - Device Specific Parameter 10 - 0xa - UINT8 - 8 - 48 - 0 - - rw - - - - Device Specific Parameter 11 - 0xb - UINT8 - 8 - 40 - 0 - - rw - - - - Device Specific Parameter 12 - 0xc - UINT8 - 8 - 32 - 0 - - rw - - - - Device Specific Parameter 13 - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Device Specific Parameter 14 - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Device Specific Parameter 15 - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - Device Specific Parameter 16 - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - - - Standard Command - V_SystemCommand - 0x2 - 1 - - Standard Command - 0x0 - UINT8 - 8 - 0 - 0 - - wo - - - 0x82 - Restore Factory Settings - - - 0x80 - Device Reset - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Device Access Locks - V_DeviceAccessLocks - 0xc - 2 - - Parameter (write) Access Lock - 0x1 - BOOL - 1 - 0 - - - rw s - - - - Data Storage Lock - 0x2 - BOOL - 1 - 1 - - - rw s - - - - Local Parameterization Lock - 0x3 - BOOL - 1 - 2 - - - rw s - - - - Local User Interface Lock - 0x4 - BOOL - 1 - 3 - - - rw s - - - - - Vendor Name - V_VendorName - 0x10 - 64 - - Vendor Name - 0x0 - String - 512 - 0 - SICK AG - SICK AG - ro - - - - - Vendor Text - V_VendorText - 0x11 - 64 - - Vendor Text - 0x0 - String - 512 - 0 - SICK Sensor Intelligence. - SICK Sensor Intelligence. - ro - - - - - Product Name - V_ProductName - 0x12 - 64 - - Product Name - 0x0 - String - 512 - 0 - AHM36B-BDQC012X12 - - ro - - - - - Product ID - V_ProductID - 0x13 - 64 - - Product ID - 0x0 - String - 512 - 0 - 1092007 - - ro - - - - - Product Text - V_ProductText - 0x14 - 64 - - Product Text - 0x0 - String - 512 - 0 - Absolute Encoder Multiturn - Absolute Encoder Multiturn - ro - - - - - Serial Number - V_SerialNumber - 0x15 - 16 - - Serial Number - 0x0 - String - 128 - 0 - 20230115 - - ro - - - - - Hardware Version - V_HardwareRevision - 0x16 - 64 - - Hardware Version - 0x0 - String - 512 - 0 - 1.0 - 1.0 - ro - - - - - Firmware Version - V_FirmwareRevision - 0x17 - 64 - - Firmware Version - 0x0 - String - 512 - 0 - 1.1.0.1746R - - ro - - - - - Application Specific Tag - V_ApplicationSpecificTag - 0x18 - 32 - - Application Specific Tag - 0x0 - String - 256 - 0 - *** - *** - rw - - - - - Device Status - V_DeviceStatus - 0x24 - 1 - - Device Status - 0x0 - UINT8 - 8 - 0 - 0 - - ro - - - 5 - 255 - Reserved - - - - - PositionVelocity - V_ProcessDataInput - 0x28 - 8 - - Position - 0x1 - UINT32 - 32 - 0 - - - ro s - - - - Velocity - 0x2 - INT32 - 32 - 32 - - - ro s - - - - - Profile Characteristic - V_ProfileIdentifier - 0xd - 8 - - Profile Characteristic - 0x1 - UINT16 - 16 - 48 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x2 - UINT16 - 16 - 32 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x3 - UINT16 - 16 - 16 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x4 - UINT16 - 16 - 0 - - - ro - see IO-Link Interface Specification - - - - PDInputDescriptor - V_PDInputDescriptor - 0xe - 6 - - Position - 0x1 - OctetString - 24 - 24 - - - ro s - see IO-Link Interface Specification - - - Velocity - 0x2 - OctetString - 24 - 0 - - - ro s - see IO-Link Interface Specification - - - - Device Specific Tag - V_DeviceSpecificTag - 0x40 - 16 - - Device Specific Tag - 0x0 - String - 128 - 0 - *** - *** - rw - see IO-Link Interface Specification - - - - Velocity Value - V_VelocityValue - 0x41 - 4 - - Velocity Value - 0x0 - INT32 - 32 - 0 - 0 - - ro - see IO-Link Interface Specification - - - - Velocity Format - V_VelocityFormat - 0x42 - 1 - - Velocity Format - 0x0 - UINT8 - 8 - 0 - 3 - 3 - rw - The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. - - 0x0 - Counts per second [cps] - - - 0x1 - Counts per 100ms [cp100ms] - - - 0x2 - Counts per 10ms [cp10ms] - - - 0x3 - Rounds per minute [rpm] - - - 0x4 - Rounds per second [rps] - - - - - Velocity Update Time - V_VelocityUpdateTime - 0x43 - 4 - - Velocity Update Time - 0x0 - UINT32 - 32 - 0 - 2 - 2 - rw - The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. - - 1 - 50 - Velocity update time range. - - - - - Velocity Integration Time - V_VelocityIntegrationTime - 0x44 - 4 - - Velocity Integration Time - 0x0 - UINT32 - 32 - 0 - 200 - 200 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 200 - Velocity integration time range. - - - - - Counts per Revolution - V_CountsPerRevolution - 0x51 - 4 - - Counts per Revolution - 0x0 - UINT32 - 32 - 0 - 4096 - 4096 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 4096 - Value range for counts per revolution. - - - - - Total Measuring Range - V_TotalMeasuringRange - 0x52 - 4 - - Total Measuring Range - 0x0 - UINT32 - 32 - 0 - 16777216 - 16777216 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 16777216 - Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. - - - - - Preset Value - V_PresetValue - 0x53 - 4 - - Preset Value - 0x0 - UINT32 - 32 - 0 - 0 - - wo - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 0 - 16777215 - Preset Value range. - - - - - Position Value - V_PositionValue - 0x54 - 4 - - Position Value - 0x0 - UINT32 - 32 - 0 - 16777047 - - ro - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - - - Counting Direction - V_CountingDirection - 0x55 - 1 - - Counting Direction - 0x0 - UINT8 - 8 - 0 - 0 - - rw - The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. - - 0x0 - Clockwise (cw) - - - 0x1 - Counter-clockwise (ccw) - - - - - RawPosition - V_RawPosition - 0x56 - 4 - - RawPosition - 0x0 - UINT32 - 32 - 0 - 2519491 - 0 - ro - Raw position, with no offset or scaling modification. - - - - Total Measuring Range adjusted - V_TotalMeasuringRangeAdjusted - 0x5b - 4 - - Total Measuring Range adjusted - 0x0 - UINT32 - 32 - 0 - 16777216 - - ro - Raw position, with no offset or scaling modification. - - - - Status Flag A - V_StatusFlagA - 0x5c - 2 - - Status Flag A - 0x0 - UINT16 - 16 - 0 - 0 - - ro - Raw position, with no offset or scaling modification. - - - - SICK Profile Version - V_SICK_ProfileVersion - 0xcd - 4 - - SICK Profile Version - 0x0 - String - 32 - 0 - 1.00 - 1.00 - ro - Raw position, with no offset or scaling modification. - - - - 0x1800 - 0x0 - DS_DumyEvent - Event for Data Storage - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - 0x0 - - - - 0 - 0 - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - - - - - GenericP - - GenericV - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001710000000000000 - - - - - - - 0x5532a0f0 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 00131c002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b00000000000000000000000000000000000000000000003010800114000000d60180001a0000001101200087000000000003004f626a656374203830313000 - 020003001c0000000b00000000000000000000000000000000000000000000003020800114000000d60180001a0000001101200087000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - DINT - - - UDINT - - - - - DINT - - - UDINT - - - - - UINT - - - - - - - - - - TermPower2 (EL9222-5500) - 1001 - - 001080002600010001000000400080008000001026010000 - 801080002200010002000000400080008000801022010000 - 001104002400010003000000000000000400001124010000 - 801108002000010004000000000000000800801120010000 - 0000000000000000001100020100000001000000000000000000000000000000 - 0000000000000000801100010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - Term 15 (EL9222-5500) - 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 - 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - - - - - - TermSensorFront (EL6224) - 1003 - - - - GenericV - - ObjFrL - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001783000000000000 - - - - - - - 0x28040aa8 - - - - - GenericV - - ObjFrR - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x1146eb68 - - - - - GenericV - - VertFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x1146eb68 - - - - - GenericV - - HorizFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x1146eb68 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 001316002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - - - - - - TermSensorBack (EL6224) - 1003 - - - - GenericV - - ObjBkL - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - GenericV - - ObjBkR - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - GenericV - - VertBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - GenericV - - HorizBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 001316002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - - - - - - TermSensorEndstop (EL6224) - 1003 - - - - GenericV - - EndStopLFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - GenericV - - EndStopLBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - GenericV - - EndStopMFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - GenericV - - EndStopMBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 001316002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - - - - - - Pr - 1003 - - - - GenericV - - PrLnFr - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eba00 - - - - - GenericV - - PrLnBk - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eac18 - - - - - GenericV - - PrMnFr - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eac18 - - - - - GenericV - - PrMnBk - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eac18 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 00130e002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170010000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170010000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170010000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UINT - - - - - UINT - - - - - UINT - - - - - UINT - - - - - - - - - - TermSafety (EL2911) - 1004 - - 001000012600010001000000000100010001001026010000 - 001100012200010002000000000100010001001122010000 - 001234002400010003000000000000000700001224010000 - 001d23002000010004000000000000000900001d20010000 - 002e00002400000003000000000000000000002e24000000 - 002f00002000000004000000000000000000002f20000000 - fa2f01002400010003000000000000000200fa2f24010000 - 0000000000000000001200020100000001000000060000000200000000000000 - 0000000000000000001d00010100000002000000060000000300000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0000000000000000000000020000000001000000060000000400010000000000 - 0000000000000000000000010000000002000000060000000500010000000000 - 0000000000000000fa2f00020100000001000000060000000600020000000000 - 0010f400f410f400 - - - - - #x00000000 - #x00000000 - #x00000000 - #x00000000 - 004003000a00000000000000000000000000000000000000000000000000000020f3100502000000010000 - - - FSOE_11 - - - - - FSOE_27 - - - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..4] OF BIT - - - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..0] OF BIT - - - DINT - - - DINT - - - DINT - - - DINT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - UINT - - - UINT - - - - - INFODATA_FB_3 - - - - - INFODATA_3_0_0 - - - - - WORD - - - UDINT - - - INFODATA_0_1_0 - - - - - BIT - - - ARRAY [0..6] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..5] OF BIT - - - - - USINT - - - USINT - - - - - ARRAY [0..1] OF BYTE - - - - - - - 0000000001000400000000000000000000000000000000000000000000000000 - 2911 - - - 0000010001000400000000000000000000000000000000000000000000000000 - 200 - - Module 2 (FSOUT) - 409 - 02000000c8000000000004000000000000000000000000000000000000000000 - 6142 - - - - 0000010001000400000000000000000000000000000000000000000000000000 - 1950 - - Module 3 (DEVICEIO) - 409 - 020000009e070000000004000000000000000000000000000000000000000000 - 7166 - - - - 0000010001000400000000000000000000000000000000000000000000000000 - 691 - - Module 4 (FSLOGIC) - 409 - 02000000b3020000000004000000000000000000000000000000000000000000 - 7167 - 6143 - - - - - - - Term 31 (EL3062) - 1005 - - 001080002600010001000000800080008000001026010000 - 801080002200010002000000800080008000801022010000 - 001100000400000003000000000000000000001104000000 - 801108002000010004000000000000000800801120010000 - 0000000000000000801100010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 030000000c00000002000000f103000000000000000000000000000000000000 - - #x1a01 - - BIT - - - - BIT - - - - BIT2 - - - - BIT2 - - - - BIT - - - - ARRAY [0..0] OF BIT - - - ARRAY [0..5] OF BIT - - - BIT - - - - BIT - - - - INT - - - - #x1a00 - - INT - - - - #x1a03 - - BIT - - - - BIT - - - - BIT2 - - - - BIT2 - - - - BIT - - - - ARRAY [0..0] OF BIT - - - ARRAY [0..5] OF BIT - - - BIT - - - - BIT - - - - INT - - - - #x1a02 - - INT - - - - - - - - Term 32 (EL9505) - 1006 - - 001001000000010004000000000000000000001000000000 - 0000000000000000001000010100000002000000000000000000000000000000 - - - BIT - - - BIT - - - - - - Term 18 (EL9011) - 1007 - - - - - -
- - CanopenMaster - - -
-801112064
- 65536 - 8192 - 0 - 3 - 0 - 5612 - 20480 -
-
- - Image - - - DriveLnMn_15 - 41 - - Inputs - - NodeState - - USINT - 61560 - - - DiagFlag - - BIT - 64911 - - - EmergencyCounter - - USINT - 62584 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - StatusWord - UINT - - - - Status - - ReceiveCounter - UINT - 65536 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 64 - - - ActualVelocity - INT - 96 - 4 - - - - Status - - ReceiveCounter - UINT - 65552 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 128 - - - ErrorRegister4001 - INT - 136 - 1 - - - TempPowerAmp - INT - 152 - 3 - - - I2TRate - USINT - 168 - 5 - - - - Status - - ReceiveCounter - UINT - 65568 - - - - - TxPDO 4 - 82 - - Inputs - - CurrentFiltered - DINT - 192 - - - Voltage - UDINT - 224 - 4 - - - - Status - - ReceiveCounter - UINT - 65584 - - - - - RxPDO 1 - 42 - - Outputs - - ControlWord - UINT - - - - Control - - SendCounter - UINT - 65536 - - - - - RxPDO 2 - 42 - - Outputs - - ProfilePos_TargetPos - DINT - 64 - - - ProfilePos_Deceleration - UDINT - 96 - - - - Control - - SendCounter - UINT - 65552 - - - - - RxPDO 3 - 42 - - Outputs - - ProfilePos_TargetVel - UDINT - 128 - - - ProfilePos_Acceleration - UDINT - 160 - - - - Control - - SendCounter - UINT - 65568 - - - - - RxPDO 4 - 42 - - Outputs - - ProfileVel_TargetVelocity - DINT - 192 - - - ModeOfOperation - SINT - 224 - - - - Control - - SendCounter - UINT - 65584 - - - - - - - Lift_18_Brake - 41 - - Inputs - - NodeState - - USINT - 61584 - - - DiagFlag - - BIT - 64914 - - - EmergencyCounter - - USINT - 62608 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - Statusword - UINT - 256 - - - - Status - - ReceiveCounter - UINT - 65600 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 320 - - - ActualVelocity - INT - 352 - - - - Status - - ReceiveCounter - UINT - 65616 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 384 - - - ErrorRegister_3001 - INT - 392 - - - TempPowerAmp - INT - 408 - 3 - - - I2TRate - USINT - 424 - 5 - - - - Status - - ReceiveCounter - UINT - 65632 - - - - - TxPDO 4 - 82 - - Inputs - - Actual_Voltage - UDINT - 448 - - - Actual_Current_Filtered - DINT - 480 - - - - Status - - ReceiveCounter - UINT - 65648 - - - - - RxPDO 1 - 42 - - Outputs - - Controlword - UINT - 256 - - - - Control - - SendCounter - UINT - 65600 - - - - - RxPDO 2 - 42 - - Outputs - - ModeOfOperation - SINT - 320 - - - Profile_Deceleration - UDINT - 328 - 1 - - - - Control - - SendCounter - UINT - 65616 - - - - - RxPDO 3 - 42 - - Outputs - - TargetVelocity_VelocityProfile - DINT - 384 - - - Profile_Acceleration - UDINT - 416 - - - - Control - - SendCounter - UINT - 65632 - - - - - RxPDO 4 - 42 - - Outputs - - TargetPosition - DINT - 448 - - - TargetVelocityProfilePosition - UDINT - 480 - - - - Control - - SendCounter - UINT - 65648 - - - - - - - DriveMain_17 - 41 - - Inputs - - NodeState - - USINT - 61576 - - - DiagFlag - - BIT - 64913 - - - EmergencyCounter - - USINT - 62600 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - StatusWord - UINT - 512 - - - - Status - - ReceiveCounter - UINT - 65664 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 576 - - - ActualVelocity - INT - 608 - - - - Status - - ReceiveCounter - UINT - 65680 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 640 - - - ErrorRegister4001 - INT - 648 - 1 - - - TempPowerAmp - INT - 664 - 3 - - - I2TRate - USINT - 680 - 5 - - - - Status - - ReceiveCounter - UINT - 65696 - - - - - TxPDO 4 - 82 - - Inputs - - CurrentFiltered - DINT - 704 - - - Voltage - UDINT - 736 - 4 - - - - Status - - ReceiveCounter - UINT - 65712 - - - - - RxPDO 1 - 42 - - Outputs - - ControlWord - UINT - 512 - - - - Control - - SendCounter - UINT - 65664 - - - - - RxPDO 2 - 42 - - Outputs - - ProfilePos_TargetPos - DINT - 576 - - - ProfilePos_Deceleration - UDINT - 608 - - - - Control - - SendCounter - UINT - 65680 - - - - - RxPDO 3 - 42 - - Outputs - - ProfilePos_TargetVel - UDINT - 640 - - - ProfilePos_Acceleration - UDINT - 672 - - - - Control - - SendCounter - UINT - 65696 - - - - - RxPDO 4 - 42 - - Outputs - - ModeOfOperation - SINT - 704 - - - ProfileVel_TargetVelocity - DINT - 712 - - - - Control - - SendCounter - UINT - 65712 - - - - - - - DriveLane_16 - 41 - - Inputs - - NodeState - - USINT - 61568 - - - DiagFlag - - BIT - 64912 - - - EmergencyCounter - - USINT - 62592 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - StatusWord - UINT - 768 - - - - Status - - ReceiveCounter - UINT - 65728 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 832 - - - ActualVelocity - INT - 864 - - - - Status - - ReceiveCounter - UINT - 65744 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 896 - - - ErrorRegister4001 - INT - 904 - 1 - - - TempPowerAmp - INT - 920 - 3 - - - I2TRate - USINT - 936 - 5 - - - - Status - - ReceiveCounter - UINT - 65760 - - - - - TxPDO 4 - 82 - - Inputs - - CurrentFiltered - DINT - 960 - - - Voltage - UDINT - 992 - 4 - - - - Status - - ReceiveCounter - UINT - 65776 - - - - - RxPDO 1 - 42 - - Outputs - - ControlWord - UINT - 768 - - - - Control - - SendCounter - UINT - 65728 - - - - - RxPDO 2 - 42 - - Outputs - - ProfilePos_TargetPos - DINT - 832 - - - ProfilePos_Deceleration - UDINT - 864 - - - - Control - - SendCounter - UINT - 65744 - - - - - RxPDO 3 - 42 - - Outputs - - ProfilePos_TargetVel - UDINT - 896 - - - ProfilePos_Acceleration - UDINT - 928 - - - - Control - - SendCounter - UINT - 65760 - - - - - RxPDO 4 - 42 - - Outputs - - ProfileVel_TargetVelocity - DINT - 960 - - - ModeOfOperation - SINT - 992 - - - - Control - - SendCounter - UINT - 65776 - - - - - - - Bms_32 - 41 - - Inputs - - NodeState - - USINT - 61696 - - - DiagFlag - - BIT - 64928 - - - EmergencyCounter - - USINT - 62720 - - - - Outputs - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - Pack_V_Sum - UINT - 1024 - - - Pack_I_Master - DINT - 1040 - 2 - - - BmsState - USINT - 1072 - 6 - - - - Status - - ReceiveCounter - UINT - 65792 - - - - - TxPDO 2 - 82 - - Inputs - - Cell_T_Min - SINT - 1088 - - - Cell_T_Max - SINT - 1096 - 1 - - - SOC - UINT - 1104 - 2 - - - Cell_V_Max - UINT - 1120 - 4 - - - Cell_V_Min - UINT - 1136 - 6 - - - - Status - - ReceiveCounter - UINT - 65808 - - - - - TxPDO 3 - 82 - - Inputs - - ConfigVersion - DINT - 1152 - - - - Status - - ReceiveCounter - UINT - 65824 - - - - - RxPDO 1 - 42 - - Outputs - - EnableCharge - BYTE - 1024 - - - EnableHeating - BYTE - 1032 - - - - Control - - SendCounter - UINT - 65792 - - - - - - - - - - - - - -
-
-
-
diff --git a/example/example/smallproject/DUTs/DUTSample.TcDUT b/example/example/smallproject/DUTs/DUTSample.TcDUT deleted file mode 100644 index 7465c32..0000000 --- a/example/example/smallproject/DUTs/DUTSample.TcDUT +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/example/example/smallproject/GVLs/GLOBAL.TcGVL b/example/example/smallproject/GVLs/GLOBAL.TcGVL deleted file mode 100644 index 9996b09..0000000 --- a/example/example/smallproject/GVLs/GLOBAL.TcGVL +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/example/example/smallproject/POUs/MAIN.TcPOU b/example/example/smallproject/POUs/MAIN.TcPOU deleted file mode 100644 index 23bc559..0000000 --- a/example/example/smallproject/POUs/MAIN.TcPOU +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example/example/smallproject/PlcTask.TcTTO b/example/example/smallproject/PlcTask.TcTTO deleted file mode 100644 index 0892585..0000000 --- a/example/example/smallproject/PlcTask.TcTTO +++ /dev/null @@ -1,17 +0,0 @@ - - - - - 10000 - 20 - - MAIN - - {e75eccf1-4734-4003-a381-908429ec142e} - {531d44a7-3855-4784-9564-19c40ec016bb} - {b58bce52-91c0-4e9c-a208-8cc264db9b28} - {27696615-41f8-4e06-9e6b-d4c59aeee840} - {1c86b903-743e-4e71-b426-12bb7d8e1796} - - - \ No newline at end of file diff --git a/example/example/smallproject/smallproject.plcproj b/example/example/smallproject/smallproject.plcproj deleted file mode 100644 index 384fa23..0000000 --- a/example/example/smallproject/smallproject.plcproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - 1.0.0.0 - 2.0 - {84419b4d-a906-4a7e-b105-28b655a900f8} - True - true - true - false - smallproject - 3.1.4024.0 - {fb64cf40-248d-4842-835d-2d98102ff47d} - {bfde0c85-6d1d-4c28-95cb-9059e79287bd} - {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} - {60a29fff-f477-4dd6-bc68-20a3e3286849} - {f2821ad3-d81b-4c74-a01a-71474780814f} - {c34386ea-03e6-4409-9a3f-3bcbf5806004} - - - - Code - - - Code - true - - - Code - - - Code - - - - - - - - - - - Tc2_Standard, * (Beckhoff Automation GmbH) - Tc2_Standard - - - Tc2_System, * (Beckhoff Automation GmbH) - Tc2_System - - - Tc3_Module, * (Beckhoff Automation GmbH) - Tc3_Module - - - - - Content - - - - - - - - "<ProjectRoot>" - - {40450F57-0AA3-4216-96F3-5444ECB29763} - - "{40450F57-0AA3-4216-96F3-5444ECB29763}" - - - ActiveVisuProfile - IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= - - - {192FAD59-8248-4824-A8DE-9177C94C195A} - - "{192FAD59-8248-4824-A8DE-9177C94C195A}" - - - - - - - - - System.Collections.Hashtable - {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} - System.String - - - - - \ No newline at end of file diff --git a/example/example/smallproject/smallproject.tmc b/example/example/smallproject/smallproject.tmc deleted file mode 100644 index 0417fb7..0000000 --- a/example/example/smallproject/smallproject.tmc +++ /dev/null @@ -1 +0,0 @@ -ST_LibVersion288iMajorUINT160iMinorUINT1616iBuildUINT1632iRevisionUINT1648nFlagsDWORD3264sVersionSTRING(23)19296TON256INBOOL864ItemTypeInputPTTIME3296ItemTypeInputQBOOL8128ItemTypeOutputETTIME32160ItemTypeOutputMBOOL8192StartTimeTIME32224PouTypeFunctionBlockDUTSample848CounterINT160ReadyBOOL816gIntArrayINT05181632EPlcPersistentStatus8USINT012PlcAppSystemInfo2048ObjIdOTCID320TaskCntUDINT3232OnlineChangeCntUDINT3264FlagsDWORD3296AdsPortUINT16128BootDataLoadedBOOL8144OldBootDataBOOL8152AppTimestampDT32160KeepOutputsOnBPBOOL8192ShutdownInProgressBOOL8200LicensesPendingBOOL8208BSODOccuredBOOL8216LoggedInBOOL8224PersistentStatusEPlcPersistentStatus8232TComSrvPtrITComObjectServer32256TcComInterfaceAppNameSTRING(63)512512ProjectNameSTRING(63)5121024PlcTaskSystemInfo1024ObjIdOTCID320CycleTimeUDINT3232PriorityUINT1664AdsPortUINT1680CycleCountUDINT3296DcTaskTimeLINT64128LastExecTimeUDINT32192FirstCycleBOOL8224CycleTimeExceededBOOL8232InCallAfterOutputUpdateBOOL8240RTViolationBOOL8248TaskNameSTRING(63)512512_Implicit_KindOfTask16INT_implicit_cyclic0_implicit_event1_implicit_external2_implicit_freewheeling3hidegenerate_implicit_init_function_Implicit_Jitter_Distribution48wRangeMaxWORD160wCountJitterNegWORD1616wCountJitterPosWORD1632hide_Implicit_Task_Info896dwVersionDWORD320pszNameSTRING(80)6464nPriorityINT16128KindOf_Implicit_KindOfTask16144bWatchdogBOOL8160bProfilingTaskBOOL8168dwEventFunctionPointerBYTE64192pszExternalEventSTRING(80)64256dwTaskEntryFunctionPointerBYTE64320dwWatchdogSensitivityDWORD32384dwIntervalDWORD32416dwWatchdogTimeDWORD32448dwLastCycleTimeDWORD32480dwAverageCycleTimeDWORD32512dwMaxCycleTimeDWORD32544dwMinCycleTimeDWORD32576diJitterDINT32608diJitterMinDINT32640diJitterMaxDINT32672dwCycleCountDWORD32704wTaskStatusWORD16736wNumOfJitterDistributionsWORD16752pJitterDistribution_Implicit_Jitter_Distribution64768bWithinSPSTimeSlicingBOOL8832byDummyBYTE8840bShouldBlockBOOL8848bActiveBOOL8856dwIECCycleCountDWORD32864hidesmallproject{08500001-0000-0000-F000-000000000064}0PlcTask#x020100703PlcTask Internal0524288Global_Version.stLibVersion_Tc2_Standard288ST_LibVersion.iMajor3.iMinor4.iBuild5.iRevision0.nFlags1.sVersion3.4.5.0const_non_replacedTcVarGlobal3072000Global_Version.stLibVersion_Tc2_System288ST_LibVersion.iMajor3.iMinor6.iBuild4.iRevision0.nFlags1.sVersion3.6.4.0const_non_replacedTcVarGlobal3072288Global_Version.stLibVersion_Tc3_Module288ST_LibVersion.iMajor3.iMinor4.iBuild5.iRevision0.nFlags1.sVersion3.4.5.0const_non_replacedTcVarGlobal3072576MAIN.fbTimer256TON3080384MAIN.bTick8BOOL3080640GLOBAL.gMyBool8BOOLTcVarGlobal3080648GLOBAL.gMyInt16INT0TcVarGlobal3080656GLOBAL.gMyDINT32DINTTcVarGlobal3080672GLOBAL.gMyIntCounter16INT0TcVarGlobal3080704GLOBAL.gMyBoolToogle8BOOLfalseTcVarGlobal3080720GLOBAL.gIntCounterActive8BOOLtrueTcVarGlobal3080728GLOBAL.gBoolToggleActive8BOOLtrueTcVarGlobal3080736GLOBAL.gTimedBoolToogle8BOOLfalseTcVarGlobal3080744GLOBAL.gTimedIntCounter16INT0TcVarGlobal3080752GLOBAL.gCyclePeriod32TIMET#2STcVarGlobal3080768GLOBAL.gTimedCounterActive8BOOLtrueTcVarGlobal3080800GLOBAL.gTimedToggleActive8BOOLtrueTcVarGlobal3080808GLOBAL.gIntArray1616INT0101TcVarGlobal3080816GLOBAL.gMyDUT848DUTSampleTcVarGlobal3082432TwinCAT_SystemInfoVarList._TaskPouOid_PlcTask32OTCIDno_initTcVarGlobal3083552TwinCAT_SystemInfoVarList._AppInfo2048PlcAppSystemInfono_initTcVarGlobal3083584TwinCAT_SystemInfoVarList._TaskInfo1024PlcTaskSystemInfo11no_initTcVarGlobal3085632TwinCAT_SystemInfoVarList._TaskOid_PlcTask32OTCIDno_initTcVarGlobal3086656TwinCAT_SystemInfoVarList.__PlcTask896_Implicit_Task_Info.dwVersion2TcContextNamePlcTaskTcVarGlobal3086720ApplicationNamePort_852ChangeDate2026-02-10T10:41:22GeneratedCodeSize61440GlobalDataSize16384 \ No newline at end of file diff --git a/example2/.gitattributes b/example2/.gitattributes deleted file mode 100644 index 5378fe0..0000000 --- a/example2/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* -text \ No newline at end of file diff --git a/example2/.gitignore b/example2/.gitignore deleted file mode 100644 index 49774d5..0000000 --- a/example2/.gitignore +++ /dev/null @@ -1,92 +0,0 @@ -# Add any directories, files, or patterns you don't want to be tracked by version control # - -## Ignore Twincat non-source files ## -Confidential/ - -### User-specific files (from 4018 tmc should be ignored) ### -*.~u -*.tpy -*.tmc -*.tmcRefac -*.suo -*.user -*.orig -*.tclrs - -### Build results ### -.engineering_servers/ -*.compileinfo -*.compiled-library -*.bootinfo -*.bootinfo_guids -*.library -*.project.~u -*.tsproj.bak -*.xti.bak -LineIDs.dbg -LineIDs.dbg.bak -_Boot/ -_CompileInfo/ -_Libraries/ -_ModuleInstall/ - -## Ignore TwinCAT HMI temporary files, build results, and -## files generated by popular TwinCAT HMI add-ons. -liveview_* -*.cache -*.db-shm -*.db-wal -*.pid -.hmiframework/ -.hmipkgs/*-*-*-*/ -tchmipublish.journal.json - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -### Visual studio files ### -*.obj -*.exe -*.pdb -*.user -*.aps -*.pch -*.vspscc -*_i.c -*_p.c -*.ncb -*.suo -*.tlb -*.tlh -*.bak -*.cache -*.ilk -*.log -*.dll -*.lib -*.sbr -*.crc -*.cid -*.autostart -*.app -*.compileinfo -*.occ -*.tizip -*.plcproj.orig -.vs/ - -### VS Code files ### -*.vscode - -### Windows files ### -Thumbs.db -*.htm diff --git a/example2/AdsGo.sln b/example2/AdsGo.sln deleted file mode 100644 index 534dcff..0000000 --- a/example2/AdsGo.sln +++ /dev/null @@ -1,131 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# TcXaeShell Solution File, Format Version 11.00 -VisualStudioVersion = 17.10.35827.194 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo", "src\AdsGo.tsproj", "{DB567925-AE3D-481C-8033-6FB9C6490B8D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) - Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) - Debug|TwinCAT OS (ARMV7-A) = Debug|TwinCAT OS (ARMV7-A) - Debug|TwinCAT OS (ARMV7-M) = Debug|TwinCAT OS (ARMV7-M) - Debug|TwinCAT OS (ARMV8-A) = Debug|TwinCAT OS (ARMV8-A) - Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) - Debug|TwinCAT OS (x64-E) = Debug|TwinCAT OS (x64-E) - Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) - Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) - Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) - Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) - Release|Any CPU = Release|Any CPU - Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) - Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) - Release|TwinCAT OS (ARMV7-A) = Release|TwinCAT OS (ARMV7-A) - Release|TwinCAT OS (ARMV7-M) = Release|TwinCAT OS (ARMV7-M) - Release|TwinCAT OS (ARMV8-A) = Release|TwinCAT OS (ARMV8-A) - Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) - Release|TwinCAT OS (x64-E) = Release|TwinCAT OS (x64-E) - Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) - Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) - Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) - Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMV7-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-A).Build.0 = Debug|TwinCAT OS (ARMV7-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMV7-M) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV7-M).Build.0 = Debug|TwinCAT OS (ARMV7-M) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMV8-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMV8-A).Build.0 = Debug|TwinCAT OS (ARMV8-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).Build.0 = Debug|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (x64-E) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64-E).Build.0 = Debug|TwinCAT OS (x64-E) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.Build.0 = Release|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMV7-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-A).Build.0 = Release|TwinCAT OS (ARMV7-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMV7-M) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV7-M).Build.0 = Release|TwinCAT OS (ARMV7-M) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMV8-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMV8-A).Build.0 = Release|TwinCAT OS (ARMV8-A) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).Build.0 = Release|TwinCAT OS (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (x64-E) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64-E).Build.0 = Release|TwinCAT OS (x64-E) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMV7-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-A).Build.0 = Debug|TwinCAT OS (ARMV7-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMV7-M) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV7-M).Build.0 = Debug|TwinCAT OS (ARMV7-M) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMV8-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMV8-A).Build.0 = Debug|TwinCAT OS (ARMV8-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).Build.0 = Debug|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (x64-E) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64-E).Build.0 = Debug|TwinCAT OS (x64-E) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.Build.0 = Release|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMV7-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-A).Build.0 = Release|TwinCAT OS (ARMV7-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMV7-M) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV7-M).Build.0 = Release|TwinCAT OS (ARMV7-M) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMV8-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMV8-A).Build.0 = Release|TwinCAT OS (ARMV8-A) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).Build.0 = Release|TwinCAT OS (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (x64-E) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64-E).Build.0 = Release|TwinCAT OS (x64-E) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {6ED517DE-02ED-425B-B7FD-97E5B120036F} - EndGlobalSection -EndGlobal diff --git a/example2/README.md b/example2/README.md deleted file mode 100644 index 895cb75..0000000 --- a/example2/README.md +++ /dev/null @@ -1,212 +0,0 @@ -# Example TwinCAT Project - -This directory contains a complete TwinCAT 3 project that demonstrates the capabilities of the ads-go library and CLI tool. - -## Project Structure - -``` -example2/ -├── AdsGo.sln # Visual Studio solution file -└── src/ - ├── AdsGo.tsproj # TwinCAT project file - ├── AdsGo_Test.plcproj # TwinCAT PLC project file - ├── Programs/ - │ └── Main.TcPOU # Main program with cycle-based and time-based logic - ├── Lib/ - │ └── TestStruct.TcDUT # Sample structured data type - └── Globals/ - └── Global.TcGVL # Global variable list with test variables -``` - -## Opening the Project - -1. Open TwinCAT XAE (Extended Automation Engineering) -2. Open `example2/AdsGo.sln` -3. Start TwinCAT Usermode Runtime -3. Build the project: **TwinCAT → Activate Configuration** -4. Set TwinCAT to RUN mode - -**Note:** The `_Boot/` directory (containing compiled boot files) is excluded from Git per TwinCAT best practices. It will be automatically generated when you activate the configuration in step 3. - -## Available Variables - -The project exposes the following global variables for ADS access: - -### Basic Types (For Testing) -- `Global.int_var: INT` - Simple integer value (default: 0) -- `Global.bool_var: BOOL` - Simple boolean value (default: FALSE) -- `Global.dint_var: DINT` - Simple double integer value (default: 0) - -### Cycle-Based Variables (Updates Every PLC Scan) -- `Global.int_counter: INT` - Increments every PLC cycle when enabled (default: 0) -- `Global.bool_toggle: BOOL` - Toggles every PLC cycle when enabled (default: FALSE) - -### Time-Based Variables (Updates Every Cycle Period) -- `Global.timer_int_counter: INT` - Increments every cycle period when enabled (default: 0) -- `Global.timed_bool_toggle: BOOL` - Toggles every cycle period when enabled (default: FALSE) - -### Control Flags -- `Global.int_counter_active: BOOL` - Enable/disable cycle-based counter (default: TRUE) -- `Global.bool_toggle_active: BOOL` - Enable/disable cycle-based toggle (default: TRUE) -- `Global.timed_int_counter_active: BOOL` - Enable/disable time-based counter (default: TRUE) -- `Global.timed_bool_toggle_active: BOOL` - Enable/disable time-based toggle (default: TRUE) - -### Configuration -- `Global.cycle_period: TIME` - Period for time-based operations (default: T#2S = 2 seconds) - -### Complex Types -- `Global.int_array: ARRAY[0..100] OF INT` - Array of 101 integers -- `Global.test_struct: TestStruct` - Structured data type with: - - `counter: INT` - Integer counter field - - `ready: BOOL` - Boolean ready flag - - `int_array: ARRAY[0..50] OF INT` - Nested integer array - -## PLC Program Logic - -The `Main` program implements two types of behavior: - -### 1. Cycle-Based Behavior (Every PLC Scan) -Executes on every PLC cycle (typically 1-10ms): - -```iecst -// Increment counter if enabled -IF Global.int_counter_active THEN - Global.int_counter := Global.int_counter + 1; -END_IF - -// Toggle boolean if enabled -IF Global.bool_toggle_active THEN - Global.bool_toggle := NOT Global.bool_toggle; -END_IF -``` - -**Use case:** Fast-changing values for testing rapid subscriptions and notifications. - -### 2. Time-Based Behavior (Every Cycle Period) -Executes periodically based on `cycle_period` (default 2 seconds): - -```iecst -// Timer triggers periodic actions -timer(IN := TRUE, PT := Global.cycle_period); - -IF timer.Q THEN - // Increment timed counter if enabled - IF Global.timed_int_counter_active THEN - Global.timer_int_counter := Global.timer_int_counter + 1; - END_IF - - // Toggle timed boolean if enabled - IF Global.timed_bool_toggle_active THEN - Global.timed_bool_toggle := NOT Global.timed_bool_toggle; - END_IF - - // Retrigger timer for next cycle - timer(IN := FALSE); -END_IF -``` - -**Use case:** Slower-changing values for testing different subscription cycle times and demonstrating configurable periods. - -## Using with ads-go CLI - -The CLI tool is pre-configured to work with these variables. See the main [README.md](../README.md#example-twincat-project) for CLI commands. - -### Quick Start Examples - -**Monitor fast-changing counter:** -```bash -./ads-cli -> sub_counter -# Watch counter increment every PLC cycle -``` - -**Control the toggles:** -```bash -> enable_toggle false # Disable cycle-based toggle -> enable_timed_toggle true # Enable time-based toggle -> read_status # Check current states -``` - -**Change timer period:** -```bash -> read_period # Check current period (default 2s) -> set_period 5 # Change to 5 seconds -> sub_timed_counter # Watch it increment every 5s -``` - -**Test all subscriptions:** -```bash -> sub_all # Subscribe to all 4 counters/toggles -> list_subs # View statistics -> unsubscribe_all # Clean up -``` - -## Variable Access Paths - -When using ads-go library programmatically: - -```go -// Read basic values -value, _ := client.ReadValue(851, "Global.int_var") -value, _ := client.ReadValue(851, "Global.bool_var") - -// Read counters -counter, _ := client.ReadValue(851, "Global.int_counter") -timedCounter, _ := client.ReadValue(851, "Global.timer_int_counter") - -// Write control flags -client.WriteValue(851, "Global.int_counter_active", true) -client.WriteValue(851, "Global.cycle_period", int32(5000)) // 5 seconds in ms - -// Read array -array, _ := client.ReadValue(851, "Global.int_array") - -// Read/write struct -dut, _ := client.ReadValue(851, "Global.test_struct") -client.WriteValue(851, "Global.test_struct", map[string]any{ - "counter": int16(100), - "ready": true, -}) - -// Subscribe to changes -callback := func(data ads.SubscriptionData) { - fmt.Printf("Value changed: %v\n", data.Value) -} -settings := ads.SubscriptionSettings{ - CycleTime: 100 * time.Millisecond, - SendOnChange: true, -} -sub, _ := client.SubscribeValue(851, "Global.bool_toggle", callback, settings) -``` - -## Requirements - -- TwinCAT 3 XAE or XAR (Build 4024 or newer recommended) -- Windows OS with TwinCAT runtime -- ADS route configured between client and PLC (see main README for setup instructions) - -## Port Configuration - -- **Default PLC Port:** 851 (TwinCAT 3 first runtime) -- For TwinCAT 2, use port 801 - -## Troubleshooting - -**Variables not found:** -- Ensure TwinCAT is in RUN mode (not CONFIG) -- Verify the PLC program is activated -- Check ADS route is configured correctly - -**Counters not incrementing:** -- Check enable flags: `read_status` in CLI -- Verify PLC is running: `state` in CLI -- For timed counters, verify cycle period: `read_period` in CLI - -**Subscription notifications not received:** -- Ensure PLC is in RUN mode -- Verify the variable is actually changing (check enable flags) -- Check subscription settings (cycle time, on-change mode) - -## License - -This example project is part of ads-go and is licensed under the MIT License. diff --git a/example2/src/AdsGo.tsproj b/example2/src/AdsGo.tsproj deleted file mode 100644 index ae1416f..0000000 --- a/example2/src/AdsGo.tsproj +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - 2ms - - - 10ms - - - 200ms - - - FileWriterTask - - - PlcTask - - - - - - - AdsGo_Test Instance - {08500001-0000-0000-F000-000000000064} - - - 0 - PlcTask - - #x02010070 - - 20 - 10000000 - - - - - - - - - - diff --git a/example2/src/AdsGo_Test.plcproj b/example2/src/AdsGo_Test.plcproj deleted file mode 100644 index 93a03d0..0000000 --- a/example2/src/AdsGo_Test.plcproj +++ /dev/null @@ -1,129 +0,0 @@ - - - - 1.0.0.0 - 2.0 - {84419b4d-a906-4a7e-b105-28b655a900f8} - True - true - true - false - AdsGo_Test - 3.1.4026.21 - {fb64cf40-248d-4842-835d-2d98102ff47d} - {bfde0c85-6d1d-4c28-95cb-9059e79287bd} - {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} - {60a29fff-f477-4dd6-bc68-20a3e3286849} - {f2821ad3-d81b-4c74-a01a-71474780814f} - {c34386ea-03e6-4409-9a3f-3bcbf5806004} - - - - Code - - - Code - true - - - Code - - - Code - - - - - - - - - - - Tc2_Standard, * (Beckhoff Automation GmbH) - Tc2_Standard - - - Tc2_System, * (Beckhoff Automation GmbH) - Tc2_System - - - Tc3_Module, * (Beckhoff Automation GmbH) - Tc3_Module - - - - - Content - - - - - - - - "<ProjectRoot>" - - {192FAD59-8248-4824-A8DE-9177C94C195A} - - "{192FAD59-8248-4824-A8DE-9177C94C195A}" - - - - {29BD8D0C-3586-4548-BB48-497B9A01693F} - - "{29BD8D0C-3586-4548-BB48-497B9A01693F}" - - NamingConventions - - "NamingConventions" - - - - Rules - - "Rules" - - - - - - - {40450F57-0AA3-4216-96F3-5444ECB29763} - - "{40450F57-0AA3-4216-96F3-5444ECB29763}" - - - ActiveVisuProfile - IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= - - - {8A0FB252-96EB-4DCC-A5B4-B4804D05E2D6} - - "{8A0FB252-96EB-4DCC-A5B4-B4804D05E2D6}" - - - WriteLineIDs - True - - - {eeeeeeee-3909-4298-8022-501ac3238667} - - "{eeeeeeee-3909-4298-8022-501ac3238667}" - - - - - - - - - System.Boolean - System.Collections.Hashtable - {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} - System.String - - - - - \ No newline at end of file diff --git a/example2/src/Globals/Global.TcGVL b/example2/src/Globals/Global.TcGVL deleted file mode 100644 index 6fcdb0b..0000000 --- a/example2/src/Globals/Global.TcGVL +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/example2/src/Lib/TestStruct.TcDUT b/example2/src/Lib/TestStruct.TcDUT deleted file mode 100644 index 050b191..0000000 --- a/example2/src/Lib/TestStruct.TcDUT +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/example2/src/Programs/Main.TcPOU b/example2/src/Programs/Main.TcPOU deleted file mode 100644 index 7d2580a..0000000 --- a/example2/src/Programs/Main.TcPOU +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/example2/src/Tasks/PlcTask.TcTTO b/example2/src/Tasks/PlcTask.TcTTO deleted file mode 100644 index 2b3a55a..0000000 --- a/example2/src/Tasks/PlcTask.TcTTO +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 10000 - 20 - - Main - - {e75eccf1-4734-4003-a381-908429ec142e} - {531d44a7-3855-4784-9564-19c40ec016bb} - {b58bce52-91c0-4e9c-a208-8cc264db9b28} - {27696615-41f8-4e06-9e6b-d4c59aeee840} - {1c86b903-743e-4e71-b426-12bb7d8e1796} - - \ No newline at end of file diff --git a/example3/.gitattributes b/example3/.gitattributes deleted file mode 100644 index 5378fe0..0000000 --- a/example3/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* -text \ No newline at end of file diff --git a/example3/.gitignore b/example3/.gitignore deleted file mode 100644 index 49774d5..0000000 --- a/example3/.gitignore +++ /dev/null @@ -1,92 +0,0 @@ -# Add any directories, files, or patterns you don't want to be tracked by version control # - -## Ignore Twincat non-source files ## -Confidential/ - -### User-specific files (from 4018 tmc should be ignored) ### -*.~u -*.tpy -*.tmc -*.tmcRefac -*.suo -*.user -*.orig -*.tclrs - -### Build results ### -.engineering_servers/ -*.compileinfo -*.compiled-library -*.bootinfo -*.bootinfo_guids -*.library -*.project.~u -*.tsproj.bak -*.xti.bak -LineIDs.dbg -LineIDs.dbg.bak -_Boot/ -_CompileInfo/ -_Libraries/ -_ModuleInstall/ - -## Ignore TwinCAT HMI temporary files, build results, and -## files generated by popular TwinCAT HMI add-ons. -liveview_* -*.cache -*.db-shm -*.db-wal -*.pid -.hmiframework/ -.hmipkgs/*-*-*-*/ -tchmipublish.journal.json - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -### Visual studio files ### -*.obj -*.exe -*.pdb -*.user -*.aps -*.pch -*.vspscc -*_i.c -*_p.c -*.ncb -*.suo -*.tlb -*.tlh -*.bak -*.cache -*.ilk -*.log -*.dll -*.lib -*.sbr -*.crc -*.cid -*.autostart -*.app -*.compileinfo -*.occ -*.tizip -*.plcproj.orig -.vs/ - -### VS Code files ### -*.vscode - -### Windows files ### -Thumbs.db -*.htm diff --git a/example3/AdsGo_Testing.sln b/example3/AdsGo_Testing.sln deleted file mode 100644 index ece293b..0000000 --- a/example3/AdsGo_Testing.sln +++ /dev/null @@ -1,110 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# TcXaeShell Solution File, Format Version 11.00 -VisualStudioVersion = 15.0.35826.109 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo_Det", "src\AdsGo_Det.tsproj", "{F2E11A39-BD69-4075-88F6-40AA79B820D2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) - Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) - Debug|TwinCAT OS (ARMV7-A) = Debug|TwinCAT OS (ARMV7-A) - Debug|TwinCAT OS (ARMV7-M) = Debug|TwinCAT OS (ARMV7-M) - Debug|TwinCAT OS (ARMV8-A) = Debug|TwinCAT OS (ARMV8-A) - Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) - Debug|TwinCAT OS (x64-E) = Debug|TwinCAT OS (x64-E) - Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) - Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) - Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) - Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) - Release|Any CPU = Release|Any CPU - Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) - Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) - Release|TwinCAT OS (ARMV7-A) = Release|TwinCAT OS (ARMV7-A) - Release|TwinCAT OS (ARMV7-M) = Release|TwinCAT OS (ARMV7-M) - Release|TwinCAT OS (ARMV8-A) = Release|TwinCAT OS (ARMV8-A) - Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) - Release|TwinCAT OS (x64-E) = Release|TwinCAT OS (x64-E) - Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) - Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) - Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) - Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) - {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EB6B064A-0FAE-4CCA-B79A-5667D02000D5} - EndGlobalSection -EndGlobal diff --git a/example3/src/AdsGo_Det.plcproj b/example3/src/AdsGo_Det.plcproj deleted file mode 100644 index 0c3d4ab..0000000 --- a/example3/src/AdsGo_Det.plcproj +++ /dev/null @@ -1,107 +0,0 @@ - - - - 1.0.0.0 - 2.0 - {A4B7050C-70E7-4D50-A7FA-822A09BE6866} - True - true - true - false - AdsGo_Det - 3.1.4026.21 - {fb64cf40-248d-4842-835d-2d98102ff47d} - {bfde0c85-6d1d-4c28-95cb-9059e79287bd} - {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} - {60a29fff-f477-4dd6-bc68-20a3e3286849} - {f2821ad3-d81b-4c74-a01a-71474780814f} - {c34386ea-03e6-4409-9a3f-3bcbf5806004} - - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - Code - - - - - - - - - - Tc2_Standard, * (Beckhoff Automation GmbH) - Tc2_Standard - - - Tc2_System, * (Beckhoff Automation GmbH) - Tc2_System - - - Tc3_Module, * (Beckhoff Automation GmbH) - Tc3_Module - - - - - Content - - - - - - - - "<ProjectRoot>" - - {40450F57-0AA3-4216-96F3-5444ECB29763} - - "{40450F57-0AA3-4216-96F3-5444ECB29763}" - - - ActiveVisuProfile - IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= - - - {192FAD59-8248-4824-A8DE-9177C94C195A} - - "{192FAD59-8248-4824-A8DE-9177C94C195A}" - - - - - - - - - System.Collections.Hashtable - {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} - System.String - - - - - \ No newline at end of file diff --git a/example3/src/AdsGo_Det.tmc b/example3/src/AdsGo_Det.tmc deleted file mode 100644 index b6f058d..0000000 --- a/example3/src/AdsGo_Det.tmc +++ /dev/null @@ -1,11 +0,0 @@ -ST_LibVersion288iMajorUINT160iMinorUINT1616iBuildUINT1632iRevisionUINT1648nFlagsDWORD3264sVersionSTRING(23)19296TestStruct2752seedUDINT320bool_varBOOL832sint_varSINT840usint_varUSINT848byte_varBYTE856int_varINT1664uint_varUINT1680word_varWORD1696dint_varDINT32128udint_varUDINT32160dword_varDWORD32192lint_varLINT64256ulint_varULINT64320lword_varLWORD64384real_varREAL32448lreal_varLREAL64512time_varTIME32576tod_varTIME_OF_DAY32608date_varDATE32640dt_varDATE_AND_TIME32672string_varSTRING(255)2048704Deterministic6400seedUDINT32640auto_modeBOOL896falseauto_tick_intervalUDINT3212850bool_varBOOL8160sint_varSINT8168usint_varUSINT8176byte_varBYTE8184int_varINT16192uint_varUINT16208word_varWORD16224dint_varDINT32256udint_varUDINT32288dword_varDWORD32320lint_varLINT64384ulint_varULINT64448lword_varLWORD64512real_varREAL32576lreal_varLREAL64640time_varTIME32704tod_varTIME_OF_DAY32736date_varDATE32768dt_varDATE_AND_TIME32800string_varSTRING(255)2048832struct_varTestStruct27522880int_arrayINT0101605632dint_arrayDINT0103205792array_2dINT03031446112_tick_counterUDINT326272_iUDINT326304_jUDINT326336PouTypeFunctionBlockPackNone112b1BOOL80d1DWORD328b2BOOL840lw1LWORD6448pack_mode0PackTwo128b1BOOL80d1DWORD3216b2BOOL848lw1LWORD6464pack_mode2PackFour160b1BOOL80d1DWORD3232b2BOOL864lw1LWORD6496pack_mode4PackEight192b1BOOL80d1DWORD3232b2BOOL864lw1LWORD64128pack_mode8StructTests704seedUDINT3264pack_nonePackNone11296pack_twoPackTwo128208pack_fourPackFour160352pack_eightPackEight192512PouTypeFunctionBlockEPlcPersistentStatus8USINT012PlcAppSystemInfo2048ObjIdOTCID320TaskCntUDINT3232OnlineChangeCntUDINT3264FlagsDWORD3296AdsPortUINT16128BootDataLoadedBOOL8144OldBootDataBOOL8152AppTimestampDT32160KeepOutputsOnBPBOOL8192ShutdownInProgressBOOL8200LicensesPendingBOOL8208BSODOccuredBOOL8216LoggedInBOOL8224PersistentStatusEPlcPersistentStatus8232TComSrvPtrITComObjectServer32256TcComInterfaceAppNameSTRING(63)512512ProjectNameSTRING(63)5121024PlcTaskSystemInfo1024ObjIdOTCID320CycleTimeUDINT3232PriorityUINT1664AdsPortUINT1680CycleCountUDINT3296DcTaskTimeLINT64128LastExecTimeUDINT32192FirstCycleBOOL8224CycleTimeExceededBOOL8232InCallAfterOutputUpdateBOOL8240RTViolationBOOL8248TaskNameSTRING(63)512512_Implicit_KindOfTask16INT_implicit_cyclic0_implicit_event1_implicit_external2_implicit_freewheeling3hidegenerate_implicit_init_function_Implicit_Jitter_Distribution48wRangeMaxWORD160wCountJitterNegWORD1616wCountJitterPosWORD1632hide_Implicit_Task_Info896dwVersionDWORD320pszNameSTRING(80)6464nPriorityINT16128KindOf_Implicit_KindOfTask16144bWatchdogBOOL8160bProfilingTaskBOOL8168dwEventFunctionPointerBYTE64192pszExternalEventSTRING(80)64256dwTaskEntryFunctionPointerBYTE64320dwWatchdogSensitivityDWORD32384dwIntervalDWORD32416dwWatchdogTimeDWORD32448dwLastCycleTimeDWORD32480dwAverageCycleTimeDWORD32512dwMaxCycleTimeDWORD32544dwMinCycleTimeDWORD32576diJitterDINT32608diJitterMinDINT32640diJitterMaxDINT32672dwCycleCountDWORD32704wTaskStatusWORD16736wNumOfJitterDistributionsWORD16752pJitterDistribution_Implicit_Jitter_Distribution64768bWithinSPSTimeSlicingBOOL8832byDummyBYTE8840bShouldBlockBOOL8848bActiveBOOL8856dwIECCycleCountDWORD32864hideAdsGo_Det{08500001-0000-0000-F000-000000000064}0PlcTask#x020100703PlcTask Internal0524288Global_Version.stLibVersion_Tc2_Standard288ST_LibVersion.iMajor3.iMinor4.iBuild5.iRevision0.nFlags1.sVersion3.4.5.0const_non_replacedTcVarGlobal3072000Global_Version.stLibVersion_Tc2_System288ST_LibVersion.iMajor3.iMinor10.iBuild1.iRevision0.nFlags1.sVersion3.10.1.0const_non_replacedTcVarGlobal3072288Global_Version.stLibVersion_Tc3_Module288ST_LibVersion.iMajor3.iMinor4.iBuild5.iRevision0.nFlags1.sVersion3.4.5.0const_non_replacedTcVarGlobal3072576Main.test6400Deterministic3080832Main.write_bool_var8BOOL3087232Main.write_sint_var8SINT3087240Main.write_usint_var8USINT3087248Main.write_byte_var8BYTE3087256Main.write_int_var16INT3087264Main.write_uint_var16UINT3087280Main.write_word_var16WORD3087296Main.write_dint_var32DINT3087328Main.write_udint_var32UDINT3087360Main.write_dword_var32DWORD3087392Main.write_lint_var64LINT3087424Main.write_ulint_var64ULINT3087488Main.write_lword_var64LWORD3087552Main.write_real_var32REAL3087616Main.write_time_var32TIME3087648Main.write_lreal_var64LREAL3087680Main.write_tod_var32TIME_OF_DAY3087744Main.write_date_var32DATE3087776Main.write_dt_var32DATE_AND_TIME3087808Main.write_string_var2048STRING(255)3087840Main.write_struct_var2752TestStruct3089920Main.write_int_array160INT0103092672Main.write_dint_array320DINT0103092832Main.write_2d_array144INT03033093152Main.struct_tests704StructTests3093312Main.pack_none112PackNone3094016Main.pack_two128PackTwo3094128Main.pack_four160PackFour3094272Main.pack_eight192PackEight3094464TwinCAT_SystemInfoVarList._TaskPouOid_PlcTask32OTCIDno_initTcVarGlobal3094816TwinCAT_SystemInfoVarList._AppInfo2048PlcAppSystemInfono_initTcVarGlobal3094848TwinCAT_SystemInfoVarList._TaskInfo1024PlcTaskSystemInfo11no_initTcVarGlobal3096896TwinCAT_SystemInfoVarList._TaskOid_PlcTask32OTCIDno_initTcVarGlobal3097920TwinCAT_SystemInfoVarList.__PlcTask896_Implicit_Task_Info.dwVersion2TcContextNamePlcTaskTcVarGlobal3097984ApplicationNamePort_852ChangeDate2026-04-27T22:53:08GeneratedCodeSize69632GlobalDataSize20480 \ No newline at end of file diff --git a/example3/src/AdsGo_Det.tsproj b/example3/src/AdsGo_Det.tsproj deleted file mode 100644 index 6e1760b..0000000 --- a/example3/src/AdsGo_Det.tsproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - PlcTask - - - - - - - AdsGo_Det Instance - {08500001-0000-0000-F000-000000000064} - - - 0 - PlcTask - - #x02010070 - - 20 - 10000000 - - - - - - - - - - diff --git a/example3/src/Globals/GVL_Test.TcGVL b/example3/src/Globals/GVL_Test.TcGVL deleted file mode 100644 index f661700..0000000 --- a/example3/src/Globals/GVL_Test.TcGVL +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - diff --git a/example3/src/Lib/Deterministic.TcPOU b/example3/src/Lib/Deterministic.TcPOU deleted file mode 100644 index 6700c9a..0000000 --- a/example3/src/Lib/Deterministic.TcPOU +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - = auto_tick_interval THEN - seed := seed + 1; - _tick_counter := 0; - ELSE - _tick_counter := _tick_counter + 1; - END_IF -END_IF - -// ----------------------------------------------------------------------- -// Update variables — all fields are deterministic functions of seed -// ----------------------------------------------------------------------- -bool_var := (seed MOD 2 = 0); -sint_var := UDINT_TO_SINT(seed); -usint_var := UDINT_TO_USINT(seed); -byte_var := UDINT_TO_BYTE(seed); -int_var := UDINT_TO_INT(seed); -uint_var := UDINT_TO_UINT(seed); -word_var := UDINT_TO_WORD(seed); -dint_var := UDINT_TO_DINT(seed); -udint_var := seed; -dword_var := UDINT_TO_DWORD(seed); -lint_var := UDINT_TO_LINT(seed); -ulint_var := UDINT_TO_ULINT(seed); -lword_var := UDINT_TO_LWORD(seed); -real_var := UDINT_TO_REAL(seed); -lreal_var := UDINT_TO_LREAL(seed); - -// Date/time types — raw truncating casts, same bit pattern Go test will verify -time_var := UDINT_TO_TIME(seed); -tod_var := UDINT_TO_TOD(seed MOD 86400000); -date_var := UDINT_TO_DATE(seed); -dt_var := UDINT_TO_DT(seed); -//ltime_var := ULINT_TO_LTIME(UDINT_TO_ULINT(seed)); -//ltod_var := ULINT_TO_LTOD(UDINT_TO_ULINT(seed) MOD 86400000000000); -//ldate_var := ULINT_TO_LDATE(UDINT_TO_ULINT(seed)); -//ldt_var := ULINT_TO_LDT(UDINT_TO_ULINT(seed)); - -string_var := CONCAT('S=', UDINT_TO_STRING(seed)); - -// ----------------------------------------------------------------------- -// Update test struct — all fields are deterministic functions of seed -// ----------------------------------------------------------------------- -struct_var.seed := seed; - -struct_var.bool_var := bool_var; -struct_var.sint_var := sint_var; -struct_var.usint_var := usint_var; -struct_var.byte_var := byte_var; -struct_var.int_var := int_var; -struct_var.uint_var := uint_var; -struct_var.word_var := word_var; -struct_var.dint_var := dint_var; -struct_var.udint_var := udint_var; -struct_var.dword_var := dword_var; -struct_var.lint_var := lint_var; -struct_var.ulint_var := ulint_var; -struct_var.lword_var := lword_var; -struct_var.real_var := real_var; -struct_var.lreal_var := lreal_var; -struct_var.time_var := time_var; -struct_var.tod_var := tod_var; -struct_var.date_var := date_var; -struct_var.dt_var := dt_var; -//struct_var.ltime_var := ltime_var; -//struct_var.ltod_var := ltod_var; -//struct_var.ldate_var := ldate_var; -//struct_var.ldt_var := ldt_var; -struct_var.string_var := string_var; - -// ----------------------------------------------------------------------- -// Update 1-D arrays: element[i] = UDINT_TO_x(seed + i) -// ----------------------------------------------------------------------- -FOR _i := 0 TO 9 DO - int_array[_i] := UDINT_TO_INT(seed + _i); - dint_array[_i] := UDINT_TO_DINT(seed + _i); -END_FOR - -// ----------------------------------------------------------------------- -// Update 2-D array: element[i,j] = UDINT_TO_INT(seed + i*3 + j) -// ----------------------------------------------------------------------- -FOR _i := 0 TO 2 DO - FOR _j := 0 TO 2 DO - array_2d[_i, _j] := UDINT_TO_INT(seed + _i * 3 + _j); - END_FOR -END_FOR]]> - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/example3/src/Lib/PackEight.TcDUT b/example3/src/Lib/PackEight.TcDUT deleted file mode 100644 index f4e4b8d..0000000 --- a/example3/src/Lib/PackEight.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/example3/src/Lib/PackFour.TcDUT b/example3/src/Lib/PackFour.TcDUT deleted file mode 100644 index 0e30d18..0000000 --- a/example3/src/Lib/PackFour.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/example3/src/Lib/PackNone.TcDUT b/example3/src/Lib/PackNone.TcDUT deleted file mode 100644 index 631b9db..0000000 --- a/example3/src/Lib/PackNone.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/example3/src/Lib/PackTwo.TcDUT b/example3/src/Lib/PackTwo.TcDUT deleted file mode 100644 index eeb8b82..0000000 --- a/example3/src/Lib/PackTwo.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/example3/src/Lib/ST_Snapshot.TcDUT b/example3/src/Lib/ST_Snapshot.TcDUT deleted file mode 100644 index 12890e0..0000000 --- a/example3/src/Lib/ST_Snapshot.TcDUT +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - diff --git a/example3/src/Lib/StructTests.TcPOU b/example3/src/Lib/StructTests.TcPOU deleted file mode 100644 index 3918cc5..0000000 --- a/example3/src/Lib/StructTests.TcPOU +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/example3/src/Lib/TestStruct.TcDUT b/example3/src/Lib/TestStruct.TcDUT deleted file mode 100644 index fac82b3..0000000 --- a/example3/src/Lib/TestStruct.TcDUT +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/example3/src/Programs/Main.TcPOU b/example3/src/Programs/Main.TcPOU deleted file mode 100644 index c6a7cea..0000000 --- a/example3/src/Programs/Main.TcPOU +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/example3/src/Tasks/PlcTask.TcTTO b/example3/src/Tasks/PlcTask.TcTTO deleted file mode 100644 index be85513..0000000 --- a/example3/src/Tasks/PlcTask.TcTTO +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 10000 - 20 - - Main - - {aec93604-4339-4a5a-b2ca-e7d3aeb2390e} - {f121c7a1-fcc3-4188-8208-80e88bf09ea3} - {7fff27cc-8d44-44b4-89bd-2b34ae3de258} - {53114e16-ba0d-4ca7-b4db-e63e436a5d85} - {cc01cc50-87c4-41b7-b6d7-7519042dc4bf} - - \ No newline at end of file diff --git a/go.mod b/go.mod index 00b90ea..dc63010 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require github.com/stretchr/testify v1.11.1 require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/lmittmann/tint v1.1.3 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index fc2bdc1..c4c1710 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,5 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/lmittmann/tint v1.1.3 h1:Hv4EaHWXQr+GTFnOU4VKf8UvAtZgn0VuKT+G0wFlO3I= -github.com/lmittmann/tint v1.1.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= From f0d056f9639c2754cbd6ac16fcf0173fbdea9b40 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:28:10 +1000 Subject: [PATCH 13/24] test(integration): add diagnostics + UploadSymbols fallback for attribute parsing --- test/integration/plc_test.go | 81 ++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/test/integration/plc_test.go b/test/integration/plc_test.go index 82e9016..6b83e32 100644 --- a/test/integration/plc_test.go +++ b/test/integration/plc_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/jarmocluyse/ads-go/pkg/ads" + adssymbol "github.com/jarmocluyse/ads-go/pkg/ads/ads-symbol" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -698,28 +699,62 @@ func TestStructPacking(t *testing.T) { } // >>> TEST_SYMBOL_ATTRIBUTES START func TestSymbolAttributes(t *testing.T) { - client := newClient(t) - - sym, err := client.GetSymbol(plcPort, "Main.attribute_test") - require.NoError(t, err, "GetSymbol Main.attribute_test") - require.NotNil(t, sym) - - // Expect two attributes: a flag-only attribute and a key=value attribute. - require.Len(t, sym.Attributes, 2, "expected 2 attributes on Main.attribute_test") - - var foundLinkalways, foundCustom bool - for _, a := range sym.Attributes { - switch a.Name { - case "linkalways": - foundLinkalways = true - assert.Equal(t, "", a.Value, "linkalways should have empty value") - case "some_made_up_key": - foundCustom = true - assert.Equal(t, "some_made_up_value", a.Value, "some_made_up_key value") - } - } - - require.True(t, foundLinkalways, "missing attribute: linkalways") - require.True(t, foundCustom, "missing attribute: some_made_up_key") + client := newClient(t) + + sym, err := client.GetSymbol(plcPort, "Main.attribute_test") + require.NoError(t, err, "GetSymbol Main.attribute_test") + require.NotNil(t, sym) + + // Log diagnostic info to help debug attribute parsing in integration environment. + t.Logf("Symbol Flags: 0x%X, TypeGUID: %s, AttributesCount: %d", uint32(sym.Flags), sym.TypeGUID, len(sym.Attributes)) + if len(sym.Attributes) == 0 { + t.Logf("Attributes slice is empty; full symbol: %+v", sym) + // Fallback: try uploading the entire symbol table and search for the symbol + t.Log("Attempting UploadSymbols fallback to locate attributes") + all, uerr := client.UploadSymbols(plcPort) + if uerr != nil { + t.Logf("UploadSymbols error: %v", uerr) + } else { + var found *adssymbol.AdsSymbol + for i := range all { + if all[i].Name == "Main.attribute_test" { + found = &all[i] + break + } + } + if found != nil { + t.Logf("Found symbol in UploadSymbols: Flags=0x%X AttributesCount=%d", uint32(found.Flags), len(found.Attributes)) + for i, a := range found.Attributes { + t.Logf("Upload Attr %d: name=%q value=%q", i, a.Name, a.Value) + } + // replace sym with found for subsequent assertions + sym = found + } else { + t.Log("Symbol not found in upload results") + } + } + } else { + for i, a := range sym.Attributes { + t.Logf("Attribute %d: name=%q value=%q", i, a.Name, a.Value) + } + } + + // Expect two attributes: a flag-only attribute and a key=value attribute. + require.Len(t, sym.Attributes, 2, "expected 2 attributes on Main.attribute_test") + + var foundLinkalways, foundCustom bool + for _, a := range sym.Attributes { + switch a.Name { + case "linkalways": + foundLinkalways = true + assert.Equal(t, "", a.Value, "linkalways should have empty value") + case "some_made_up_key": + foundCustom = true + assert.Equal(t, "some_made_up_value", a.Value, "some_made_up_key value") + } + } + + require.True(t, foundLinkalways, "missing attribute: linkalways") + require.True(t, foundCustom, "missing attribute: some_made_up_key") } // <<< TEST_SYMBOL_ATTRIBUTES END From 4f6179e915bbac626b078e8a872372236ca60901 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:28:39 +1000 Subject: [PATCH 14/24] test(integration): refine attribute expectation to instance-level attribute --- test/integration/plc_test.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/test/integration/plc_test.go b/test/integration/plc_test.go index 6b83e32..f77e5fd 100644 --- a/test/integration/plc_test.go +++ b/test/integration/plc_test.go @@ -697,7 +697,6 @@ func TestStructPacking(t *testing.T) { } }) } -// >>> TEST_SYMBOL_ATTRIBUTES START func TestSymbolAttributes(t *testing.T) { client := newClient(t) @@ -739,22 +738,17 @@ func TestSymbolAttributes(t *testing.T) { } } - // Expect two attributes: a flag-only attribute and a key=value attribute. - require.Len(t, sym.Attributes, 2, "expected 2 attributes on Main.attribute_test") + // Expect one attribute: a flag-only attribute. + require.Len(t, sym.Attributes, 1, "expected 1 attribute on Main.attribute_test") - var foundLinkalways, foundCustom bool + var foundCustom bool for _, a := range sym.Attributes { switch a.Name { - case "linkalways": - foundLinkalways = true - assert.Equal(t, "", a.Value, "linkalways should have empty value") - case "some_made_up_key": + case "some_made_up_var_key": foundCustom = true - assert.Equal(t, "some_made_up_value", a.Value, "some_made_up_key value") + assert.Equal(t, "some_made_up_var_value", a.Value, "some_made_up_var_key value") } } - require.True(t, foundLinkalways, "missing attribute: linkalways") - require.True(t, foundCustom, "missing attribute: some_made_up_key") + require.True(t, foundCustom, "missing attribute: some_made_up_var_key") } -// <<< TEST_SYMBOL_ATTRIBUTES END From da1134c8b428db719b1d5a2b19b5c469dd246ea7 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:32:24 +1000 Subject: [PATCH 15/24] chore(testing/plc): add PLC testing project files and update TESTING.md --- TESTING.md | 36 +++++ .../example/smallproject/DUTs/DUTSample.TcDUT | 13 ++ .../example/smallproject/GVLs/GLOBAL.TcGVL | 33 ++++ .../example/smallproject/POUs/MAIN.TcPOU | 57 +++++++ plc/testing/.gitattributes | 1 + plc/testing/.gitignore | 92 +++++++++++ plc/testing/AdsGo_Testing.sln | 114 +++++++++++++ plc/testing/src/AdsGo_Det.plcproj | 113 +++++++++++++ plc/testing/src/AdsGo_Det.tsproj | 39 +++++ plc/testing/src/Lib/AttributeTest.TcPOU | 16 ++ plc/testing/src/Lib/PackEight.TcDUT | 14 ++ plc/testing/src/Lib/PackFour.TcDUT | 14 ++ plc/testing/src/Lib/PackNone.TcDUT | 14 ++ plc/testing/src/Lib/PackTwo.TcDUT | 14 ++ plc/testing/src/Lib/ST_Snapshot.TcDUT | 40 +++++ plc/testing/src/Lib/StructTest.TcPOU | 51 ++++++ plc/testing/src/Lib/TypeTest.TcPOU | 150 ++++++++++++++++++ plc/testing/src/Lib/TypeTestStruct.TcDUT | 34 ++++ plc/testing/src/Lib/WriteTest.TcPOU | 43 +++++ plc/testing/src/Programs/Main.TcPOU | 27 ++++ plc/testing/src/Tasks/PlcTask.TcTTO | 16 ++ 21 files changed, 931 insertions(+) create mode 100644 TESTING.md create mode 100644 plc/example/example/smallproject/DUTs/DUTSample.TcDUT create mode 100644 plc/example/example/smallproject/GVLs/GLOBAL.TcGVL create mode 100644 plc/example/example/smallproject/POUs/MAIN.TcPOU create mode 100644 plc/testing/.gitattributes create mode 100644 plc/testing/.gitignore create mode 100644 plc/testing/AdsGo_Testing.sln create mode 100644 plc/testing/src/AdsGo_Det.plcproj create mode 100644 plc/testing/src/AdsGo_Det.tsproj create mode 100644 plc/testing/src/Lib/AttributeTest.TcPOU create mode 100644 plc/testing/src/Lib/PackEight.TcDUT create mode 100644 plc/testing/src/Lib/PackFour.TcDUT create mode 100644 plc/testing/src/Lib/PackNone.TcDUT create mode 100644 plc/testing/src/Lib/PackTwo.TcDUT create mode 100644 plc/testing/src/Lib/ST_Snapshot.TcDUT create mode 100644 plc/testing/src/Lib/StructTest.TcPOU create mode 100644 plc/testing/src/Lib/TypeTest.TcPOU create mode 100644 plc/testing/src/Lib/TypeTestStruct.TcDUT create mode 100644 plc/testing/src/Lib/WriteTest.TcPOU create mode 100644 plc/testing/src/Programs/Main.TcPOU create mode 100644 plc/testing/src/Tasks/PlcTask.TcTTO diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..567067e --- /dev/null +++ b/TESTING.md @@ -0,0 +1,36 @@ +# Testing + +First be sure to set your ADS target NetId +```pwsh +$env:ADS_TARGET_NET_ID = "199.4.42.250.1.1" +``` + +- Run all unit tests across the repo (excludes integration build-tag tests): +```pwsh +go test ./... +``` + +- Run all tests (including tests with the integration build tag): +```pwsh +go test -v -tags=integration ./... +``` + +- Run all tests in the integration package: +```pwsh +go test -v -tags=integration ./test/integration +``` + +- Run a single top-level test in the integration package: +```pwsh +go test -v -tags=integration ./test/integration -run '^TestReadAllAccessPaths$' +``` + +- Run a specific subtest (e.g., sint_max inside TestStaticSeed): +```pwsh +go test -v -tags=integration ./test/integration -run '^TestStaticSeed/sint_max$' +``` + +- List all tests in the package: +```pwsh +go test -list . -tags=integration ./test/integration +``` diff --git a/plc/example/example/smallproject/DUTs/DUTSample.TcDUT b/plc/example/example/smallproject/DUTs/DUTSample.TcDUT new file mode 100644 index 0000000..3bd71af --- /dev/null +++ b/plc/example/example/smallproject/DUTs/DUTSample.TcDUT @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/plc/example/example/smallproject/GVLs/GLOBAL.TcGVL b/plc/example/example/smallproject/GVLs/GLOBAL.TcGVL new file mode 100644 index 0000000..7f94063 --- /dev/null +++ b/plc/example/example/smallproject/GVLs/GLOBAL.TcGVL @@ -0,0 +1,33 @@ + + + + + + \ No newline at end of file diff --git a/plc/example/example/smallproject/POUs/MAIN.TcPOU b/plc/example/example/smallproject/POUs/MAIN.TcPOU new file mode 100644 index 0000000..73ce9bd --- /dev/null +++ b/plc/example/example/smallproject/POUs/MAIN.TcPOU @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/.gitattributes b/plc/testing/.gitattributes new file mode 100644 index 0000000..5378fe0 --- /dev/null +++ b/plc/testing/.gitattributes @@ -0,0 +1 @@ +* -text \ No newline at end of file diff --git a/plc/testing/.gitignore b/plc/testing/.gitignore new file mode 100644 index 0000000..49774d5 --- /dev/null +++ b/plc/testing/.gitignore @@ -0,0 +1,92 @@ +# Add any directories, files, or patterns you don't want to be tracked by version control # + +## Ignore Twincat non-source files ## +Confidential/ + +### User-specific files (from 4018 tmc should be ignored) ### +*.~u +*.tpy +*.tmc +*.tmcRefac +*.suo +*.user +*.orig +*.tclrs + +### Build results ### +.engineering_servers/ +*.compileinfo +*.compiled-library +*.bootinfo +*.bootinfo_guids +*.library +*.project.~u +*.tsproj.bak +*.xti.bak +LineIDs.dbg +LineIDs.dbg.bak +_Boot/ +_CompileInfo/ +_Libraries/ +_ModuleInstall/ + +## Ignore TwinCAT HMI temporary files, build results, and +## files generated by popular TwinCAT HMI add-ons. +liveview_* +*.cache +*.db-shm +*.db-wal +*.pid +.hmiframework/ +.hmipkgs/*-*-*-*/ +tchmipublish.journal.json + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +### Visual studio files ### +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +*.dll +*.lib +*.sbr +*.crc +*.cid +*.autostart +*.app +*.compileinfo +*.occ +*.tizip +*.plcproj.orig +.vs/ + +### VS Code files ### +*.vscode + +### Windows files ### +Thumbs.db +*.htm diff --git a/plc/testing/AdsGo_Testing.sln b/plc/testing/AdsGo_Testing.sln new file mode 100644 index 0000000..947240a --- /dev/null +++ b/plc/testing/AdsGo_Testing.sln @@ -0,0 +1,114 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# TcXaeShell Solution File, Format Version 11.00 +VisualStudioVersion = 15.0.35826.109 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo_Det", "src\AdsGo_Det.tsproj", "{F2E11A39-BD69-4075-88F6-40AA79B820D2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) + Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) + Debug|TwinCAT OS (ARMV7-A) = Debug|TwinCAT OS (ARMV7-A) + Debug|TwinCAT OS (ARMV7-M) = Debug|TwinCAT OS (ARMV7-M) + Debug|TwinCAT OS (ARMV8-A) = Debug|TwinCAT OS (ARMV8-A) + Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) + Debug|TwinCAT OS (x64-E) = Debug|TwinCAT OS (x64-E) + Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) + Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) + Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) + Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) + Release|Any CPU = Release|Any CPU + Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) + Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) + Release|TwinCAT OS (ARMV7-A) = Release|TwinCAT OS (ARMV7-A) + Release|TwinCAT OS (ARMV7-M) = Release|TwinCAT OS (ARMV7-M) + Release|TwinCAT OS (ARMV8-A) = Release|TwinCAT OS (ARMV8-A) + Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) + Release|TwinCAT OS (x64-E) = Release|TwinCAT OS (x64-E) + Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) + Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) + Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) + Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64).Build.0 = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64).Build.0 = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) + {F2E11A39-BD69-4075-88F6-40AA79B820D2}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV7-M).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (ARMV8-A).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64).Build.0 = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT OS (x64-E).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV7-M).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (ARMV8-A).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64).Build.0 = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT OS (x64-E).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {A4B7050C-70E7-4D50-A7FA-822A09BE6866}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EB6B064A-0FAE-4CCA-B79A-5667D02000D5} + EndGlobalSection +EndGlobal diff --git a/plc/testing/src/AdsGo_Det.plcproj b/plc/testing/src/AdsGo_Det.plcproj new file mode 100644 index 0000000..f888a30 --- /dev/null +++ b/plc/testing/src/AdsGo_Det.plcproj @@ -0,0 +1,113 @@ + + + + 1.0.0.0 + 2.0 + {A4B7050C-70E7-4D50-A7FA-822A09BE6866} + True + true + true + false + AdsGo_Det + 3.1.4026.21 + {fb64cf40-248d-4842-835d-2d98102ff47d} + {bfde0c85-6d1d-4c28-95cb-9059e79287bd} + {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} + {60a29fff-f477-4dd6-bc68-20a3e3286849} + {f2821ad3-d81b-4c74-a01a-71474780814f} + {c34386ea-03e6-4409-9a3f-3bcbf5806004} + + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + Tc2_Standard, * (Beckhoff Automation GmbH) + Tc2_Standard + + + Tc2_System, * (Beckhoff Automation GmbH) + Tc2_System + + + Tc3_Module, * (Beckhoff Automation GmbH) + Tc3_Module + + + + + Content + + + + + + + + "<ProjectRoot>" + + {40450F57-0AA3-4216-96F3-5444ECB29763} + + "{40450F57-0AA3-4216-96F3-5444ECB29763}" + + + ActiveVisuProfile + IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= + + + {192FAD59-8248-4824-A8DE-9177C94C195A} + + "{192FAD59-8248-4824-A8DE-9177C94C195A}" + + + + + + + + + System.Collections.Hashtable + {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} + System.String + + + + + \ No newline at end of file diff --git a/plc/testing/src/AdsGo_Det.tsproj b/plc/testing/src/AdsGo_Det.tsproj new file mode 100644 index 0000000..27d2514 --- /dev/null +++ b/plc/testing/src/AdsGo_Det.tsproj @@ -0,0 +1,39 @@ + + + + + + + + + + + + PlcTask + + + + + + + AdsGo_Det Instance + {08500001-0000-0000-F000-000000000064} + + + 0 + PlcTask + + #x02010070 + + 20 + 10000000 + + + + + + + + + + diff --git a/plc/testing/src/Lib/AttributeTest.TcPOU b/plc/testing/src/Lib/AttributeTest.TcPOU new file mode 100644 index 0000000..c00ade6 --- /dev/null +++ b/plc/testing/src/Lib/AttributeTest.TcPOU @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/PackEight.TcDUT b/plc/testing/src/Lib/PackEight.TcDUT new file mode 100644 index 0000000..a69b05e --- /dev/null +++ b/plc/testing/src/Lib/PackEight.TcDUT @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/PackFour.TcDUT b/plc/testing/src/Lib/PackFour.TcDUT new file mode 100644 index 0000000..a66a6ab --- /dev/null +++ b/plc/testing/src/Lib/PackFour.TcDUT @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/PackNone.TcDUT b/plc/testing/src/Lib/PackNone.TcDUT new file mode 100644 index 0000000..1b6e645 --- /dev/null +++ b/plc/testing/src/Lib/PackNone.TcDUT @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/PackTwo.TcDUT b/plc/testing/src/Lib/PackTwo.TcDUT new file mode 100644 index 0000000..336bf4a --- /dev/null +++ b/plc/testing/src/Lib/PackTwo.TcDUT @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/ST_Snapshot.TcDUT b/plc/testing/src/Lib/ST_Snapshot.TcDUT new file mode 100644 index 0000000..3c17512 --- /dev/null +++ b/plc/testing/src/Lib/ST_Snapshot.TcDUT @@ -0,0 +1,40 @@ + + + + + + diff --git a/plc/testing/src/Lib/StructTest.TcPOU b/plc/testing/src/Lib/StructTest.TcPOU new file mode 100644 index 0000000..e1ec557 --- /dev/null +++ b/plc/testing/src/Lib/StructTest.TcPOU @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/TypeTest.TcPOU b/plc/testing/src/Lib/TypeTest.TcPOU new file mode 100644 index 0000000..8797b24 --- /dev/null +++ b/plc/testing/src/Lib/TypeTest.TcPOU @@ -0,0 +1,150 @@ + + + + + + = auto_tick_interval THEN + seed := seed + 1; + _tick_counter := 0; + ELSE + _tick_counter := _tick_counter + 1; + END_IF +END_IF + +// ----------------------------------------------------------------------- +// Update variables — all fields are deterministic functions of seed +// ----------------------------------------------------------------------- +bool_var := (seed MOD 2 = 0); +sint_var := UDINT_TO_SINT(seed); +usint_var := UDINT_TO_USINT(seed); +byte_var := UDINT_TO_BYTE(seed); +int_var := UDINT_TO_INT(seed); +uint_var := UDINT_TO_UINT(seed); +word_var := UDINT_TO_WORD(seed); +dint_var := UDINT_TO_DINT(seed); +udint_var := seed; +dword_var := UDINT_TO_DWORD(seed); +lint_var := UDINT_TO_LINT(seed); +ulint_var := UDINT_TO_ULINT(seed); +lword_var := UDINT_TO_LWORD(seed); +real_var := UDINT_TO_REAL(seed); +lreal_var := UDINT_TO_LREAL(seed); + +// Date/time types — raw truncating casts, same bit pattern Go test will verify +time_var := UDINT_TO_TIME(seed); +tod_var := UDINT_TO_TOD(seed MOD 86400000); +date_var := UDINT_TO_DATE(seed); +dt_var := UDINT_TO_DT(seed); +//ltime_var := ULINT_TO_LTIME(UDINT_TO_ULINT(seed)); +//ltod_var := ULINT_TO_LTOD(UDINT_TO_ULINT(seed) MOD 86400000000000); +//ldate_var := ULINT_TO_LDATE(UDINT_TO_ULINT(seed)); +//ldt_var := ULINT_TO_LDT(UDINT_TO_ULINT(seed)); + +string_var := CONCAT('S=', UDINT_TO_STRING(seed)); + +// ----------------------------------------------------------------------- +// Update test struct — all fields are deterministic functions of seed +// ----------------------------------------------------------------------- +struct_var.seed := seed; + +struct_var.bool_var := bool_var; +struct_var.sint_var := sint_var; +struct_var.usint_var := usint_var; +struct_var.byte_var := byte_var; +struct_var.int_var := int_var; +struct_var.uint_var := uint_var; +struct_var.word_var := word_var; +struct_var.dint_var := dint_var; +struct_var.udint_var := udint_var; +struct_var.dword_var := dword_var; +struct_var.lint_var := lint_var; +struct_var.ulint_var := ulint_var; +struct_var.lword_var := lword_var; +struct_var.real_var := real_var; +struct_var.lreal_var := lreal_var; +struct_var.time_var := time_var; +struct_var.tod_var := tod_var; +struct_var.date_var := date_var; +struct_var.dt_var := dt_var; +//struct_var.ltime_var := ltime_var; +//struct_var.ltod_var := ltod_var; +//struct_var.ldate_var := ldate_var; +//struct_var.ldt_var := ldt_var; +struct_var.string_var := string_var; + +// ----------------------------------------------------------------------- +// Update 1-D arrays: element[i] = UDINT_TO_x(seed + i) +// ----------------------------------------------------------------------- +FOR _i := 0 TO 9 DO + int_array[_i] := UDINT_TO_INT(seed + _i); + dint_array[_i] := UDINT_TO_DINT(seed + _i); +END_FOR + +// ----------------------------------------------------------------------- +// Update 2-D array: element[i,j] = UDINT_TO_INT(seed + i*3 + j) +// ----------------------------------------------------------------------- +FOR _i := 0 TO 2 DO + FOR _j := 0 TO 2 DO + int_array_2d[_i, _j] := UDINT_TO_INT(seed + _i * 3 + _j); + END_FOR +END_FOR]]> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/TypeTestStruct.TcDUT b/plc/testing/src/Lib/TypeTestStruct.TcDUT new file mode 100644 index 0000000..ad67b1f --- /dev/null +++ b/plc/testing/src/Lib/TypeTestStruct.TcDUT @@ -0,0 +1,34 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/WriteTest.TcPOU b/plc/testing/src/Lib/WriteTest.TcPOU new file mode 100644 index 0000000..b305fe3 --- /dev/null +++ b/plc/testing/src/Lib/WriteTest.TcPOU @@ -0,0 +1,43 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Programs/Main.TcPOU b/plc/testing/src/Programs/Main.TcPOU new file mode 100644 index 0000000..c8067a9 --- /dev/null +++ b/plc/testing/src/Programs/Main.TcPOU @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Tasks/PlcTask.TcTTO b/plc/testing/src/Tasks/PlcTask.TcTTO new file mode 100644 index 0000000..e61d22e --- /dev/null +++ b/plc/testing/src/Tasks/PlcTask.TcTTO @@ -0,0 +1,16 @@ + + + + + 10000 + 20 + + Main + + {aec93604-4339-4a5a-b2ca-e7d3aeb2390e} + {f121c7a1-fcc3-4188-8208-80e88bf09ea3} + {7fff27cc-8d44-44b4-89bd-2b34ae3de258} + {53114e16-ba0d-4ca7-b4db-e63e436a5d85} + {cc01cc50-87c4-41b7-b6d7-7519042dc4bf} + + \ No newline at end of file From 52a5c235cc4220c11ad2e519850c90f0f491ae02 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:37:01 +1000 Subject: [PATCH 16/24] chore(testing/plc): add example project files (example & smallproject) --- plc/example/.gitattributes | 1 + plc/example/.gitignore | 92 + plc/example/README.md | 211 + plc/example/example.sln | 86 + plc/example/example/example.tsproj | 7915 +++++++++++++++++ .../example/smallproject/PlcTask.TcTTO | 17 + .../example/smallproject/smallproject.plcproj | 94 + 7 files changed, 8416 insertions(+) create mode 100644 plc/example/.gitattributes create mode 100644 plc/example/.gitignore create mode 100644 plc/example/README.md create mode 100644 plc/example/example.sln create mode 100644 plc/example/example/example.tsproj create mode 100644 plc/example/example/smallproject/PlcTask.TcTTO create mode 100644 plc/example/example/smallproject/smallproject.plcproj diff --git a/plc/example/.gitattributes b/plc/example/.gitattributes new file mode 100644 index 0000000..5378fe0 --- /dev/null +++ b/plc/example/.gitattributes @@ -0,0 +1 @@ +* -text \ No newline at end of file diff --git a/plc/example/.gitignore b/plc/example/.gitignore new file mode 100644 index 0000000..49774d5 --- /dev/null +++ b/plc/example/.gitignore @@ -0,0 +1,92 @@ +# Add any directories, files, or patterns you don't want to be tracked by version control # + +## Ignore Twincat non-source files ## +Confidential/ + +### User-specific files (from 4018 tmc should be ignored) ### +*.~u +*.tpy +*.tmc +*.tmcRefac +*.suo +*.user +*.orig +*.tclrs + +### Build results ### +.engineering_servers/ +*.compileinfo +*.compiled-library +*.bootinfo +*.bootinfo_guids +*.library +*.project.~u +*.tsproj.bak +*.xti.bak +LineIDs.dbg +LineIDs.dbg.bak +_Boot/ +_CompileInfo/ +_Libraries/ +_ModuleInstall/ + +## Ignore TwinCAT HMI temporary files, build results, and +## files generated by popular TwinCAT HMI add-ons. +liveview_* +*.cache +*.db-shm +*.db-wal +*.pid +.hmiframework/ +.hmipkgs/*-*-*-*/ +tchmipublish.journal.json + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +### Visual studio files ### +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +*.dll +*.lib +*.sbr +*.crc +*.cid +*.autostart +*.app +*.compileinfo +*.occ +*.tizip +*.plcproj.orig +.vs/ + +### VS Code files ### +*.vscode + +### Windows files ### +Thumbs.db +*.htm diff --git a/plc/example/README.md b/plc/example/README.md new file mode 100644 index 0000000..1151aaa --- /dev/null +++ b/plc/example/README.md @@ -0,0 +1,211 @@ +# Example TwinCAT Project + +This directory contains a complete TwinCAT 3 project that demonstrates the capabilities of the ads-go library and CLI tool. + +## Project Structure + +``` +example/ +├── example.sln # Visual Studio solution file +└── example/ + ├── example.tsproj # TwinCAT project file + └── smallproject/ # PLC project + ├── POUs/ + │ └── MAIN.TcPOU # Main program with cycle-based and time-based logic + ├── DUTs/ + │ └── DUTSample.TcDUT # Sample structured data type + └── GVLs/ + └── GLOBAL.TcGVL # Global variable list with test variables +``` + +## Opening the Project + +1. Open TwinCAT XAE (Extended Automation Engineering) +2. Open `example/example.sln` +3. Build the project: **TwinCAT → Activate Configuration** +4. Set TwinCAT to RUN mode + +**Note:** The `_Boot/` directory (containing compiled boot files) is excluded from Git per TwinCAT best practices. It will be automatically generated when you activate the configuration in step 3. + +## Available Variables + +The project exposes the following global variables for ADS access: + +### Basic Types (For Testing) +- `GLOBAL.gMyInt: INT` - Simple integer value (default: 0) +- `GLOBAL.gMyBool: BOOL` - Simple boolean value (default: FALSE) +- `GLOBAL.gMyDINT: DINT` - Simple double integer value (default: 0) + +### Cycle-Based Variables (Updates Every PLC Scan) +- `GLOBAL.gMyIntCounter: INT` - Increments every PLC cycle when enabled (default: 0) +- `GLOBAL.gMyBoolToogle: BOOL` - Toggles every PLC cycle when enabled (default: FALSE) + +### Time-Based Variables (Updates Every Cycle Period) +- `GLOBAL.gTimedIntCounter: INT` - Increments every cycle period when enabled (default: 0) +- `GLOBAL.gTimedBoolToogle: BOOL` - Toggles every cycle period when enabled (default: FALSE) + +### Control Flags +- `GLOBAL.gIntCounterActive: BOOL` - Enable/disable cycle-based counter (default: TRUE) +- `GLOBAL.gBoolToggleActive: BOOL` - Enable/disable cycle-based toggle (default: TRUE) +- `GLOBAL.gTimedCounterActive: BOOL` - Enable/disable time-based counter (default: TRUE) +- `GLOBAL.gTimedToggleActive: BOOL` - Enable/disable time-based toggle (default: TRUE) + +### Configuration +- `GLOBAL.gCyclePeriod: TIME` - Period for time-based operations (default: T#2S = 2 seconds) + +### Complex Types +- `GLOBAL.gIntArray: ARRAY[0..100] OF INT` - Array of 101 integers +- `GLOBAL.gMyDUT: DUTSample` - Structured data type with: + - `Counter: INT` - Integer counter field + - `Ready: BOOL` - Boolean ready flag + - `gIntArray: ARRAY[0..50] OF INT` - Nested integer array + +## PLC Program Logic + +The `MAIN` program implements two types of behavior: + +### 1. Cycle-Based Behavior (Every PLC Scan) +Executes on every PLC cycle (typically 1-10ms): + +```iecst +// Increment counter if enabled +IF GLOBAL.gIntCounterActive THEN + GLOBAL.gMyIntCounter := GLOBAL.gMyIntCounter + 1; +END_IF + +// Toggle boolean if enabled +IF GLOBAL.gBoolToggleActive THEN + GLOBAL.gMyBoolToogle := NOT GLOBAL.gMyBoolToogle; +END_IF +``` + +**Use case:** Fast-changing values for testing rapid subscriptions and notifications. + +### 2. Time-Based Behavior (Every Cycle Period) +Executes periodically based on `gCyclePeriod` (default 2 seconds): + +```iecst +// Timer triggers periodic actions +fbTimer(IN := TRUE, PT := GLOBAL.gCyclePeriod); + +IF fbTimer.Q THEN + // Increment timed counter if enabled + IF GLOBAL.gTimedCounterActive THEN + GLOBAL.gTimedIntCounter := GLOBAL.gTimedIntCounter + 1; + END_IF + + // Toggle timed boolean if enabled + IF GLOBAL.gTimedToggleActive THEN + GLOBAL.gTimedBoolToogle := NOT GLOBAL.gTimedBoolToogle; + END_IF + + // Retrigger timer for next cycle + fbTimer(IN := FALSE); +END_IF +``` + +**Use case:** Slower-changing values for testing different subscription cycle times and demonstrating configurable periods. + +## Using with ads-go CLI + +The CLI tool is pre-configured to work with these variables. See the main [README.md](../README.md#example-twincat-project) for CLI commands. + +### Quick Start Examples + +**Monitor fast-changing counter:** +```bash +./ads-cli +> sub_counter +# Watch counter increment every PLC cycle +``` + +**Control the toggles:** +```bash +> enable_toggle false # Disable cycle-based toggle +> enable_timed_toggle true # Enable time-based toggle +> read_status # Check current states +``` + +**Change timer period:** +```bash +> read_period # Check current period (default 2s) +> set_period 5 # Change to 5 seconds +> sub_timed_counter # Watch it increment every 5s +``` + +**Test all subscriptions:** +```bash +> sub_all # Subscribe to all 4 counters/toggles +> list_subs # View statistics +> unsubscribe_all # Clean up +``` + +## Variable Access Paths + +When using ads-go library programmatically: + +```go +// Read basic values +value, _ := client.ReadValue(851, "GLOBAL.gMyInt") +value, _ := client.ReadValue(851, "GLOBAL.gMyBool") + +// Read counters +counter, _ := client.ReadValue(851, "GLOBAL.gMyIntCounter") +timedCounter, _ := client.ReadValue(851, "GLOBAL.gTimedIntCounter") + +// Write control flags +client.WriteValue(851, "GLOBAL.gIntCounterActive", true) +client.WriteValue(851, "GLOBAL.gCyclePeriod", int32(5000)) // 5 seconds in ms + +// Read array +array, _ := client.ReadValue(851, "GLOBAL.gIntArray") + +// Read/write struct +dut, _ := client.ReadValue(851, "GLOBAL.gMyDUT") +client.WriteValue(851, "GLOBAL.gMyDUT", map[string]any{ + "Counter": int16(100), + "Ready": true, +}) + +// Subscribe to changes +callback := func(data ads.SubscriptionData) { + fmt.Printf("Value changed: %v\n", data.Value) +} +settings := ads.SubscriptionSettings{ + CycleTime: 100 * time.Millisecond, + SendOnChange: true, +} +sub, _ := client.SubscribeValue(851, "GLOBAL.gMyBoolToogle", callback, settings) +``` + +## Requirements + +- TwinCAT 3 XAE or XAR (Build 4024 or newer recommended) +- Windows OS with TwinCAT runtime +- ADS route configured between client and PLC (see main README for setup instructions) + +## Port Configuration + +- **Default PLC Port:** 851 (TwinCAT 3 first runtime) +- For TwinCAT 2, use port 801 + +## Troubleshooting + +**Variables not found:** +- Ensure TwinCAT is in RUN mode (not CONFIG) +- Verify the PLC program is activated +- Check ADS route is configured correctly + +**Counters not incrementing:** +- Check enable flags: `read_status` in CLI +- Verify PLC is running: `state` in CLI +- For timed counters, verify cycle period: `read_period` in CLI + +**Subscription notifications not received:** +- Ensure PLC is in RUN mode +- Verify the variable is actually changing (check enable flags) +- Check subscription settings (cycle time, on-change mode) + +## License + +This example project is part of ads-go and is licensed under the MIT License. diff --git a/plc/example/example.sln b/plc/example/example.sln new file mode 100644 index 0000000..b510765 --- /dev/null +++ b/plc/example/example.sln @@ -0,0 +1,86 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# TcXaeShell Solution File, Format Version 11.00 +VisualStudioVersion = 15.0.28307.2092 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "example", "example\example.tsproj", "{DB567925-AE3D-481C-8033-6FB9C6490B8D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) + Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) + Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) + Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) + Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) + Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) + Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) + Release|Any CPU = Release|Any CPU + Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) + Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) + Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) + Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) + Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) + Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) + Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6ED517DE-02ED-425B-B7FD-97E5B120036F} + EndGlobalSection +EndGlobal diff --git a/plc/example/example/example.tsproj b/plc/example/example/example.tsproj new file mode 100644 index 0000000..2631375 --- /dev/null +++ b/plc/example/example/example.tsproj @@ -0,0 +1,7915 @@ + + + + + ARRAY [0..1] OF BIT + 2 + BIT + + 0 + 2 + + + + ARRAY [0..2] OF BIT + 3 + BIT + + 0 + 3 + + + + ARRAY [0..10] OF BIT + 11 + BIT + + 0 + 11 + + + + ARRAY [0..13] OF BIT + 14 + BIT + + 0 + 14 + + + + ARRAY [0..0] OF BYTE + 8 + BYTE + + 0 + 1 + + + + ARRAY [0..3] OF BIT + 4 + BIT + + 0 + 4 + + + + FSOE_11 + 88 + + FSoE CMD + USINT + 8 + 0 + + + FSoE Data 0 + BITARR16 + 16 + 8 + + + FSoE CRC_0 + UINT + 16 + 24 + + + FSoE Data 1 + BITARR16 + 16 + 40 + + + FSoE CRC_1 + UINT + 16 + 56 + + + FSoE ConnID + UINT + 16 + 72 + + + + FSOE_27 + 216 + + FSoE CMD + USINT + 8 + 0 + + + FSoE Data 0 + BITARR16 + 16 + 8 + + + FSoE CRC_0 + UINT + 16 + 24 + + + FSoE Data 1 + BITARR16 + 16 + 40 + + + FSoE CRC_1 + UINT + 16 + 56 + + + FSoE Data 2 + BITARR16 + 16 + 72 + + + FSoE CRC_2 + UINT + 16 + 88 + + + FSoE Data 3 + BITARR16 + 16 + 104 + + + FSoE CRC_3 + UINT + 16 + 120 + + + FSoE Data 4 + BITARR16 + 16 + 136 + + + FSoE CRC_4 + UINT + 16 + 152 + + + FSoE Data 5 + BITARR16 + 16 + 168 + + + FSoE CRC_5 + UINT + 16 + 184 + + + FSoE ConnID + UINT + 16 + 200 + + + + ARRAY [0..4] OF BIT + 5 + BIT + + 0 + 5 + + + + ARRAY [0..0] OF BIT + 1 + BIT + + 0 + 1 + + + + INFODATA_FB_3 + 24 + + State + USINT + 8 + 0 + + + Diag + UINT + 16 + 8 + + + + INFODATA_3_0_0 + 16 + + State + USINT + 8 + 0 + + + Diag + USINT + 8 + 8 + + + + INFODATA_0_1_0 + 8 + + Input Safe Data Byte 0 + BYTE + 8 + 0 + + + + ARRAY [0..6] OF BIT + 7 + BIT + + 0 + 7 + + + + ARRAY [0..5] OF BIT + 6 + BIT + + 0 + 6 + + + + ARRAY [0..1] OF BYTE + 16 + BYTE + + 0 + 2 + + + + + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ff808080808080808080808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff007fff007fff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000120b0000120b00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ff000000000000ff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ff000000000000ff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff008066008099008066008099008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffffff000000ffffff0000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff0000ff00ffff0000ff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00800000ffff008000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff + + + + + + + + + + + 2ms + + + 10ms + + + 200ms + + + FileWriterTask + + + PlcTask + + + + + + + smallproject Instance + {08500001-0000-0000-F000-000000000064} + + + 0 + PlcTask + + #x02010070 + + 20 + 10000000 + + + + + + + + + + + Device 1 (EtherCAT) + + +
-801112064
+ 131072 + 8192 + 0 + 3 + 0 + 5612 + 20480 + +
0
+ 4096 + 12288 + 2 + 0 + 1 +
+ 128 + 1024 + 32 + 768 + 64 + 512 + 16 + 640 + + -1350027980 + 1 + 256 + +
+
+ + Image + + + TermEtherCAT (EK1200) + 1000 + + + TermPower1 (EL9222-5500) + 1001 + + 001080002600010001000000400080008000001026010000 + 801080002200010002000000400080008000801022010000 + 001104002400010003000000000000000400001124010000 + 801108002000010004000000000000000800801120010000 + 0000000000000000001100020100000001000000000000000000000000000000 + 0000000000000000801100010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + Term 12 (EL9222-5500) + 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 + 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + + + + + + TermOutput (EL2008) + 1002 + + 000f01004400010003000000000000000000000f44090000 + 0000000000000000000f00020100000001000000000000000000000000000000 + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + + TermSensorGnrl (EL6224) + 1003 + + + + GenericV + + Lift + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x5532a948 + + + + SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml + SICK AG + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png + AHM36B-BAQC012x12 + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png + Encoders + Absolute Encoder Multiturn + 0x00000720 + 0x00000020 + 008001D60000001A000011012087000000000000 + + Direct Parameters 1 + V_DirectParameters_1 + 0x0 + 16 + + Reserved + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Master Cycle Time + 0x2 + UINT8 + 8 + 112 + 32 + + rw + + + + Min Cycle Time + 0x3 + UINT8 + 8 + 104 + 32 + + rw + + + + M-Sequence Capability + 0x4 + UINT8 + 8 + 96 + 41 + + rw + + + + IO-Link Version ID + 0x5 + UINT8 + 8 + 88 + 17 + + rw + + + + Process Data Input Length + 0x6 + UINT8 + 8 + 80 + 135 + + rw + + + + Process Data Output Length + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Vendor ID 1 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Vendor ID 2 + 0x9 + UINT8 + 8 + 56 + 26 + + rw + + + + Device ID 1 + 0xa + UINT8 + 8 + 48 + 128 + + rw + + + + Device ID 2 + 0xb + UINT8 + 8 + 40 + 1 + + rw + + + + Device ID 3 + 0xc + UINT8 + 8 + 32 + 214 + + rw + + + + Reserved + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Reserved + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Reserved + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + System Command + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Direct Parameters 2 + V_DirectParameters_2 + 0x1 + 16 + + Device Specific Parameter 1 + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Device Specific Parameter 2 + 0x2 + UINT8 + 8 + 112 + 0 + + rw + + + + Device Specific Parameter 3 + 0x3 + UINT8 + 8 + 104 + 0 + + rw + + + + Device Specific Parameter 4 + 0x4 + UINT8 + 8 + 96 + 0 + + rw + + + + Device Specific Parameter 5 + 0x5 + UINT8 + 8 + 88 + 0 + + rw + + + + Device Specific Parameter 6 + 0x6 + UINT8 + 8 + 80 + 0 + + rw + + + + Device Specific Parameter 7 + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Device Specific Parameter 8 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Device Specific Parameter 9 + 0x9 + UINT8 + 8 + 56 + 0 + + rw + + + + Device Specific Parameter 10 + 0xa + UINT8 + 8 + 48 + 0 + + rw + + + + Device Specific Parameter 11 + 0xb + UINT8 + 8 + 40 + 0 + + rw + + + + Device Specific Parameter 12 + 0xc + UINT8 + 8 + 32 + 0 + + rw + + + + Device Specific Parameter 13 + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Device Specific Parameter 14 + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Device Specific Parameter 15 + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + Device Specific Parameter 16 + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + + + Standard Command + V_SystemCommand + 0x2 + 1 + + Standard Command + 0x0 + UINT8 + 8 + 0 + 0 + + wo + + + 0x82 + Restore Factory Settings + + + 0x80 + Device Reset + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Device Access Locks + V_DeviceAccessLocks + 0xc + 2 + + Parameter (write) Access Lock + 0x1 + BOOL + 1 + 0 + + + rw s + + + + Data Storage Lock + 0x2 + BOOL + 1 + 1 + + + rw s + + + + Local Parameterization Lock + 0x3 + BOOL + 1 + 2 + + + rw s + + + + Local User Interface Lock + 0x4 + BOOL + 1 + 3 + + + rw s + + + + + Vendor Name + V_VendorName + 0x10 + 64 + + Vendor Name + 0x0 + String + 512 + 0 + SICK AG + SICK AG + ro + + + + + Vendor Text + V_VendorText + 0x11 + 64 + + Vendor Text + 0x0 + String + 512 + 0 + SICK Sensor Intelligence. + SICK Sensor Intelligence. + ro + + + + + Product Name + V_ProductName + 0x12 + 64 + + Product Name + 0x0 + String + 512 + 0 + AHM36B-BDQC012X12 + + ro + + + + + Product ID + V_ProductID + 0x13 + 64 + + Product ID + 0x0 + String + 512 + 0 + 1092007 + + ro + + + + + Product Text + V_ProductText + 0x14 + 64 + + Product Text + 0x0 + String + 512 + 0 + Absolute Encoder Multiturn + Absolute Encoder Multiturn + ro + + + + + Serial Number + V_SerialNumber + 0x15 + 16 + + Serial Number + 0x0 + String + 128 + 0 + 20230078 + + ro + + + + + Hardware Version + V_HardwareRevision + 0x16 + 64 + + Hardware Version + 0x0 + String + 512 + 0 + 1.0 + 1.0 + ro + + + + + Firmware Version + V_FirmwareRevision + 0x17 + 64 + + Firmware Version + 0x0 + String + 512 + 0 + 1.1.0.1746R + + ro + + + + + Application Specific Tag + V_ApplicationSpecificTag + 0x18 + 32 + + Application Specific Tag + 0x0 + String + 256 + 0 + *** + *** + rw + + + + + Device Status + V_DeviceStatus + 0x24 + 1 + + Device Status + 0x0 + UINT8 + 8 + 0 + 0 + + ro + + + 5 + 255 + Reserved + + + + + PositionVelocity + V_ProcessDataInput + 0x28 + 8 + + Position + 0x1 + UINT32 + 32 + 0 + + + ro s + + + + Velocity + 0x2 + INT32 + 32 + 32 + + + ro s + + + + + Profile Characteristic + V_ProfileIdentifier + 0xd + 8 + + Profile Characteristic + 0x1 + UINT16 + 16 + 48 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x2 + UINT16 + 16 + 32 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x3 + UINT16 + 16 + 16 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x4 + UINT16 + 16 + 0 + + + ro + see IO-Link Interface Specification + + + + PDInputDescriptor + V_PDInputDescriptor + 0xe + 6 + + Position + 0x1 + OctetString + 24 + 24 + + + ro s + see IO-Link Interface Specification + + + Velocity + 0x2 + OctetString + 24 + 0 + + + ro s + see IO-Link Interface Specification + + + + Device Specific Tag + V_DeviceSpecificTag + 0x40 + 16 + + Device Specific Tag + 0x0 + String + 128 + 0 + *** + *** + rw + see IO-Link Interface Specification + + + + Velocity Value + V_VelocityValue + 0x41 + 4 + + Velocity Value + 0x0 + INT32 + 32 + 0 + 0 + + ro + see IO-Link Interface Specification + + + + Velocity Format + V_VelocityFormat + 0x42 + 1 + + Velocity Format + 0x0 + UINT8 + 8 + 0 + 3 + 3 + rw + The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. + + 0x0 + Counts per second [cps] + + + 0x1 + Counts per 100ms [cp100ms] + + + 0x2 + Counts per 10ms [cp10ms] + + + 0x3 + Rounds per minute [rpm] + + + 0x4 + Rounds per second [rps] + + + + + Velocity Update Time + V_VelocityUpdateTime + 0x43 + 4 + + Velocity Update Time + 0x0 + UINT32 + 32 + 0 + 2 + 2 + rw + The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. + + 1 + 50 + Velocity update time range. + + + + + Velocity Integration Time + V_VelocityIntegrationTime + 0x44 + 4 + + Velocity Integration Time + 0x0 + UINT32 + 32 + 0 + 200 + 200 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 200 + Velocity integration time range. + + + + + Counts per Revolution + V_CountsPerRevolution + 0x51 + 4 + + Counts per Revolution + 0x0 + UINT32 + 32 + 0 + 4096 + 4096 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 4096 + Value range for counts per revolution. + + + + + Total Measuring Range + V_TotalMeasuringRange + 0x52 + 4 + + Total Measuring Range + 0x0 + UINT32 + 32 + 0 + 16777216 + 16777216 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 16777216 + Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. + + + + + Preset Value + V_PresetValue + 0x53 + 4 + + Preset Value + 0x0 + UINT32 + 32 + 0 + 100100 + + wo + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 0 + 16777215 + Preset Value range. + + + + + Position Value + V_PositionValue + 0x54 + 4 + + Position Value + 0x0 + UINT32 + 32 + 0 + 100100 + + ro + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + + + Counting Direction + V_CountingDirection + 0x55 + 1 + + Counting Direction + 0x0 + UINT8 + 8 + 0 + 0 + + rw + The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. + + 0x0 + Clockwise (cw) + + + 0x1 + Counter-clockwise (ccw) + + + + + RawPosition + V_RawPosition + 0x56 + 4 + + RawPosition + 0x0 + UINT32 + 32 + 0 + 2205371 + 0 + ro + Raw position, with no offset or scaling modification. + + + + Total Measuring Range adjusted + V_TotalMeasuringRangeAdjusted + 0x5b + 4 + + Total Measuring Range adjusted + 0x0 + UINT32 + 32 + 0 + 16777216 + + ro + Raw position, with no offset or scaling modification. + + + + Status Flag A + V_StatusFlagA + 0x5c + 2 + + Status Flag A + 0x0 + UINT16 + 16 + 0 + 0 + + ro + Raw position, with no offset or scaling modification. + + + + SICK Profile Version + V_SICK_ProfileVersion + 0xcd + 4 + + SICK Profile Version + 0x0 + String + 32 + 0 + 1.00 + 1.00 + ro + Raw position, with no offset or scaling modification. + + + + 0x1800 + 0x0 + DS_DumyEvent + Event for Data Storage + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + 0x0 + + + + 0 + 0 + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + + + + SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml + SICK AG + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png + AHM36B-BAQC012x12 + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png + Encoders + Absolute Encoder Multiturn + 0x00000720 + 0x00000020 + 008001D60000001A000011012087000000000000 + + Direct Parameters 1 + V_DirectParameters_1 + 0x0 + 16 + + Reserved + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Master Cycle Time + 0x2 + UINT8 + 8 + 112 + 32 + + rw + + + + Min Cycle Time + 0x3 + UINT8 + 8 + 104 + 32 + + rw + + + + M-Sequence Capability + 0x4 + UINT8 + 8 + 96 + 41 + + rw + + + + IO-Link Version ID + 0x5 + UINT8 + 8 + 88 + 17 + + rw + + + + Process Data Input Length + 0x6 + UINT8 + 8 + 80 + 135 + + rw + + + + Process Data Output Length + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Vendor ID 1 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Vendor ID 2 + 0x9 + UINT8 + 8 + 56 + 26 + + rw + + + + Device ID 1 + 0xa + UINT8 + 8 + 48 + 128 + + rw + + + + Device ID 2 + 0xb + UINT8 + 8 + 40 + 1 + + rw + + + + Device ID 3 + 0xc + UINT8 + 8 + 32 + 214 + + rw + + + + Reserved + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Reserved + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Reserved + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + System Command + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Direct Parameters 2 + V_DirectParameters_2 + 0x1 + 16 + + Device Specific Parameter 1 + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Device Specific Parameter 2 + 0x2 + UINT8 + 8 + 112 + 0 + + rw + + + + Device Specific Parameter 3 + 0x3 + UINT8 + 8 + 104 + 0 + + rw + + + + Device Specific Parameter 4 + 0x4 + UINT8 + 8 + 96 + 0 + + rw + + + + Device Specific Parameter 5 + 0x5 + UINT8 + 8 + 88 + 0 + + rw + + + + Device Specific Parameter 6 + 0x6 + UINT8 + 8 + 80 + 0 + + rw + + + + Device Specific Parameter 7 + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Device Specific Parameter 8 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Device Specific Parameter 9 + 0x9 + UINT8 + 8 + 56 + 0 + + rw + + + + Device Specific Parameter 10 + 0xa + UINT8 + 8 + 48 + 0 + + rw + + + + Device Specific Parameter 11 + 0xb + UINT8 + 8 + 40 + 0 + + rw + + + + Device Specific Parameter 12 + 0xc + UINT8 + 8 + 32 + 0 + + rw + + + + Device Specific Parameter 13 + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Device Specific Parameter 14 + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Device Specific Parameter 15 + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + Device Specific Parameter 16 + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + + + Standard Command + V_SystemCommand + 0x2 + 1 + + Standard Command + 0x0 + UINT8 + 8 + 0 + 0 + + wo + + + 0x82 + Restore Factory Settings + + + 0x80 + Device Reset + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Device Access Locks + V_DeviceAccessLocks + 0xc + 2 + + Parameter (write) Access Lock + 0x1 + BOOL + 1 + 0 + + + rw s + + + + Data Storage Lock + 0x2 + BOOL + 1 + 1 + + + rw s + + + + Local Parameterization Lock + 0x3 + BOOL + 1 + 2 + + + rw s + + + + Local User Interface Lock + 0x4 + BOOL + 1 + 3 + + + rw s + + + + + Vendor Name + V_VendorName + 0x10 + 64 + + Vendor Name + 0x0 + String + 512 + 0 + SICK AG + SICK AG + ro + + + + + Vendor Text + V_VendorText + 0x11 + 64 + + Vendor Text + 0x0 + String + 512 + 0 + SICK Sensor Intelligence. + SICK Sensor Intelligence. + ro + + + + + Product Name + V_ProductName + 0x12 + 64 + + Product Name + 0x0 + String + 512 + 0 + AHM36B-BDQC012X12 + + ro + + + + + Product ID + V_ProductID + 0x13 + 64 + + Product ID + 0x0 + String + 512 + 0 + 1092007 + + ro + + + + + Product Text + V_ProductText + 0x14 + 64 + + Product Text + 0x0 + String + 512 + 0 + Absolute Encoder Multiturn + Absolute Encoder Multiturn + ro + + + + + Serial Number + V_SerialNumber + 0x15 + 16 + + Serial Number + 0x0 + String + 128 + 0 + 20230115 + + ro + + + + + Hardware Version + V_HardwareRevision + 0x16 + 64 + + Hardware Version + 0x0 + String + 512 + 0 + 1.0 + 1.0 + ro + + + + + Firmware Version + V_FirmwareRevision + 0x17 + 64 + + Firmware Version + 0x0 + String + 512 + 0 + 1.1.0.1746R + + ro + + + + + Application Specific Tag + V_ApplicationSpecificTag + 0x18 + 32 + + Application Specific Tag + 0x0 + String + 256 + 0 + *** + *** + rw + + + + + Device Status + V_DeviceStatus + 0x24 + 1 + + Device Status + 0x0 + UINT8 + 8 + 0 + 0 + + ro + + + 5 + 255 + Reserved + + + + + PositionVelocity + V_ProcessDataInput + 0x28 + 8 + + Position + 0x1 + UINT32 + 32 + 0 + + + ro s + + + + Velocity + 0x2 + INT32 + 32 + 32 + + + ro s + + + + + Profile Characteristic + V_ProfileIdentifier + 0xd + 8 + + Profile Characteristic + 0x1 + UINT16 + 16 + 48 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x2 + UINT16 + 16 + 32 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x3 + UINT16 + 16 + 16 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x4 + UINT16 + 16 + 0 + + + ro + see IO-Link Interface Specification + + + + PDInputDescriptor + V_PDInputDescriptor + 0xe + 6 + + Position + 0x1 + OctetString + 24 + 24 + + + ro s + see IO-Link Interface Specification + + + Velocity + 0x2 + OctetString + 24 + 0 + + + ro s + see IO-Link Interface Specification + + + + Device Specific Tag + V_DeviceSpecificTag + 0x40 + 16 + + Device Specific Tag + 0x0 + String + 128 + 0 + *** + *** + rw + see IO-Link Interface Specification + + + + Velocity Value + V_VelocityValue + 0x41 + 4 + + Velocity Value + 0x0 + INT32 + 32 + 0 + 0 + + ro + see IO-Link Interface Specification + + + + Velocity Format + V_VelocityFormat + 0x42 + 1 + + Velocity Format + 0x0 + UINT8 + 8 + 0 + 3 + 3 + rw + The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. + + 0x0 + Counts per second [cps] + + + 0x1 + Counts per 100ms [cp100ms] + + + 0x2 + Counts per 10ms [cp10ms] + + + 0x3 + Rounds per minute [rpm] + + + 0x4 + Rounds per second [rps] + + + + + Velocity Update Time + V_VelocityUpdateTime + 0x43 + 4 + + Velocity Update Time + 0x0 + UINT32 + 32 + 0 + 2 + 2 + rw + The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. + + 1 + 50 + Velocity update time range. + + + + + Velocity Integration Time + V_VelocityIntegrationTime + 0x44 + 4 + + Velocity Integration Time + 0x0 + UINT32 + 32 + 0 + 200 + 200 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 200 + Velocity integration time range. + + + + + Counts per Revolution + V_CountsPerRevolution + 0x51 + 4 + + Counts per Revolution + 0x0 + UINT32 + 32 + 0 + 4096 + 4096 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 4096 + Value range for counts per revolution. + + + + + Total Measuring Range + V_TotalMeasuringRange + 0x52 + 4 + + Total Measuring Range + 0x0 + UINT32 + 32 + 0 + 16777216 + 16777216 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 16777216 + Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. + + + + + Preset Value + V_PresetValue + 0x53 + 4 + + Preset Value + 0x0 + UINT32 + 32 + 0 + 0 + + wo + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 0 + 16777215 + Preset Value range. + + + + + Position Value + V_PositionValue + 0x54 + 4 + + Position Value + 0x0 + UINT32 + 32 + 0 + 16777047 + + ro + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + + + Counting Direction + V_CountingDirection + 0x55 + 1 + + Counting Direction + 0x0 + UINT8 + 8 + 0 + 0 + + rw + The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. + + 0x0 + Clockwise (cw) + + + 0x1 + Counter-clockwise (ccw) + + + + + RawPosition + V_RawPosition + 0x56 + 4 + + RawPosition + 0x0 + UINT32 + 32 + 0 + 2519491 + 0 + ro + Raw position, with no offset or scaling modification. + + + + Total Measuring Range adjusted + V_TotalMeasuringRangeAdjusted + 0x5b + 4 + + Total Measuring Range adjusted + 0x0 + UINT32 + 32 + 0 + 16777216 + + ro + Raw position, with no offset or scaling modification. + + + + Status Flag A + V_StatusFlagA + 0x5c + 2 + + Status Flag A + 0x0 + UINT16 + 16 + 0 + 0 + + ro + Raw position, with no offset or scaling modification. + + + + SICK Profile Version + V_SICK_ProfileVersion + 0xcd + 4 + + SICK Profile Version + 0x0 + String + 32 + 0 + 1.00 + 1.00 + ro + Raw position, with no offset or scaling modification. + + + + 0x1800 + 0x0 + DS_DumyEvent + Event for Data Storage + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + 0x0 + + + + 0 + 0 + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + + + + + GenericP + + GenericV + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001710000000000000 + + + + + + + 0x5532a0f0 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 00131c002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b00000000000000000000000000000000000000000000003010800114000000d60180001a0000001101200087000000000003004f626a656374203830313000 + 020003001c0000000b00000000000000000000000000000000000000000000003020800114000000d60180001a0000001101200087000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + DINT + + + UDINT + + + + + DINT + + + UDINT + + + + + UINT + + + + + + + + + + TermPower2 (EL9222-5500) + 1001 + + 001080002600010001000000400080008000001026010000 + 801080002200010002000000400080008000801022010000 + 001104002400010003000000000000000400001124010000 + 801108002000010004000000000000000800801120010000 + 0000000000000000001100020100000001000000000000000000000000000000 + 0000000000000000801100010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + Term 15 (EL9222-5500) + 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 + 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + + + + + + TermSensorFront (EL6224) + 1003 + + + + GenericV + + ObjFrL + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001783000000000000 + + + + + + + 0x28040aa8 + + + + + GenericV + + ObjFrR + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x1146eb68 + + + + + GenericV + + VertFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x1146eb68 + + + + + GenericV + + HorizFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x1146eb68 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 001316002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + + + + + + TermSensorBack (EL6224) + 1003 + + + + GenericV + + ObjBkL + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + GenericV + + ObjBkR + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + GenericV + + VertBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + GenericV + + HorizBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 001316002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + + + + + + TermSensorEndstop (EL6224) + 1003 + + + + GenericV + + EndStopLFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + GenericV + + EndStopLBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + GenericV + + EndStopMFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + GenericV + + EndStopMBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 001316002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + + + + + + Pr + 1003 + + + + GenericV + + PrLnFr + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eba00 + + + + + GenericV + + PrLnBk + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eac18 + + + + + GenericV + + PrMnFr + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eac18 + + + + + GenericV + + PrMnBk + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eac18 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 00130e002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170010000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170010000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170010000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UINT + + + + + UINT + + + + + UINT + + + + + UINT + + + + + + + + + + TermSafety (EL2911) + 1004 + + 001000012600010001000000000100010001001026010000 + 001100012200010002000000000100010001001122010000 + 001234002400010003000000000000000700001224010000 + 001d23002000010004000000000000000900001d20010000 + 002e00002400000003000000000000000000002e24000000 + 002f00002000000004000000000000000000002f20000000 + fa2f01002400010003000000000000000200fa2f24010000 + 0000000000000000001200020100000001000000060000000200000000000000 + 0000000000000000001d00010100000002000000060000000300000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0000000000000000000000020000000001000000060000000400010000000000 + 0000000000000000000000010000000002000000060000000500010000000000 + 0000000000000000fa2f00020100000001000000060000000600020000000000 + 0010f400f410f400 + + + + + #x00000000 + #x00000000 + #x00000000 + #x00000000 + 004003000a00000000000000000000000000000000000000000000000000000020f3100502000000010000 + + + FSOE_11 + + + + + FSOE_27 + + + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..4] OF BIT + + + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..0] OF BIT + + + DINT + + + DINT + + + DINT + + + DINT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + UINT + + + UINT + + + + + INFODATA_FB_3 + + + + + INFODATA_3_0_0 + + + + + WORD + + + UDINT + + + INFODATA_0_1_0 + + + + + BIT + + + ARRAY [0..6] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..5] OF BIT + + + + + USINT + + + USINT + + + + + ARRAY [0..1] OF BYTE + + + + + + + 0000000001000400000000000000000000000000000000000000000000000000 + 2911 + + + 0000010001000400000000000000000000000000000000000000000000000000 + 200 + + Module 2 (FSOUT) + 409 + 02000000c8000000000004000000000000000000000000000000000000000000 + 6142 + + + + 0000010001000400000000000000000000000000000000000000000000000000 + 1950 + + Module 3 (DEVICEIO) + 409 + 020000009e070000000004000000000000000000000000000000000000000000 + 7166 + + + + 0000010001000400000000000000000000000000000000000000000000000000 + 691 + + Module 4 (FSLOGIC) + 409 + 02000000b3020000000004000000000000000000000000000000000000000000 + 7167 + 6143 + + + + + + + Term 31 (EL3062) + 1005 + + 001080002600010001000000800080008000001026010000 + 801080002200010002000000800080008000801022010000 + 001100000400000003000000000000000000001104000000 + 801108002000010004000000000000000800801120010000 + 0000000000000000801100010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 030000000c00000002000000f103000000000000000000000000000000000000 + + #x1a01 + + BIT + + + + BIT + + + + BIT2 + + + + BIT2 + + + + BIT + + + + ARRAY [0..0] OF BIT + + + ARRAY [0..5] OF BIT + + + BIT + + + + BIT + + + + INT + + + + #x1a00 + + INT + + + + #x1a03 + + BIT + + + + BIT + + + + BIT2 + + + + BIT2 + + + + BIT + + + + ARRAY [0..0] OF BIT + + + ARRAY [0..5] OF BIT + + + BIT + + + + BIT + + + + INT + + + + #x1a02 + + INT + + + + + + + + Term 32 (EL9505) + 1006 + + 001001000000010004000000000000000000001000000000 + 0000000000000000001000010100000002000000000000000000000000000000 + + + BIT + + + BIT + + + + + + Term 18 (EL9011) + 1007 + + + + + +
+ + CanopenMaster + + +
-801112064
+ 65536 + 8192 + 0 + 3 + 0 + 5612 + 20480 +
+
+ + Image + + + DriveLnMn_15 + 41 + + Inputs + + NodeState + + USINT + 61560 + + + DiagFlag + + BIT + 64911 + + + EmergencyCounter + + USINT + 62584 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + StatusWord + UINT + + + + Status + + ReceiveCounter + UINT + 65536 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 64 + + + ActualVelocity + INT + 96 + 4 + + + + Status + + ReceiveCounter + UINT + 65552 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 128 + + + ErrorRegister4001 + INT + 136 + 1 + + + TempPowerAmp + INT + 152 + 3 + + + I2TRate + USINT + 168 + 5 + + + + Status + + ReceiveCounter + UINT + 65568 + + + + + TxPDO 4 + 82 + + Inputs + + CurrentFiltered + DINT + 192 + + + Voltage + UDINT + 224 + 4 + + + + Status + + ReceiveCounter + UINT + 65584 + + + + + RxPDO 1 + 42 + + Outputs + + ControlWord + UINT + + + + Control + + SendCounter + UINT + 65536 + + + + + RxPDO 2 + 42 + + Outputs + + ProfilePos_TargetPos + DINT + 64 + + + ProfilePos_Deceleration + UDINT + 96 + + + + Control + + SendCounter + UINT + 65552 + + + + + RxPDO 3 + 42 + + Outputs + + ProfilePos_TargetVel + UDINT + 128 + + + ProfilePos_Acceleration + UDINT + 160 + + + + Control + + SendCounter + UINT + 65568 + + + + + RxPDO 4 + 42 + + Outputs + + ProfileVel_TargetVelocity + DINT + 192 + + + ModeOfOperation + SINT + 224 + + + + Control + + SendCounter + UINT + 65584 + + + + + + + Lift_18_Brake + 41 + + Inputs + + NodeState + + USINT + 61584 + + + DiagFlag + + BIT + 64914 + + + EmergencyCounter + + USINT + 62608 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + Statusword + UINT + 256 + + + + Status + + ReceiveCounter + UINT + 65600 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 320 + + + ActualVelocity + INT + 352 + + + + Status + + ReceiveCounter + UINT + 65616 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 384 + + + ErrorRegister_3001 + INT + 392 + + + TempPowerAmp + INT + 408 + 3 + + + I2TRate + USINT + 424 + 5 + + + + Status + + ReceiveCounter + UINT + 65632 + + + + + TxPDO 4 + 82 + + Inputs + + Actual_Voltage + UDINT + 448 + + + Actual_Current_Filtered + DINT + 480 + + + + Status + + ReceiveCounter + UINT + 65648 + + + + + RxPDO 1 + 42 + + Outputs + + Controlword + UINT + 256 + + + + Control + + SendCounter + UINT + 65600 + + + + + RxPDO 2 + 42 + + Outputs + + ModeOfOperation + SINT + 320 + + + Profile_Deceleration + UDINT + 328 + 1 + + + + Control + + SendCounter + UINT + 65616 + + + + + RxPDO 3 + 42 + + Outputs + + TargetVelocity_VelocityProfile + DINT + 384 + + + Profile_Acceleration + UDINT + 416 + + + + Control + + SendCounter + UINT + 65632 + + + + + RxPDO 4 + 42 + + Outputs + + TargetPosition + DINT + 448 + + + TargetVelocityProfilePosition + UDINT + 480 + + + + Control + + SendCounter + UINT + 65648 + + + + + + + DriveMain_17 + 41 + + Inputs + + NodeState + + USINT + 61576 + + + DiagFlag + + BIT + 64913 + + + EmergencyCounter + + USINT + 62600 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + StatusWord + UINT + 512 + + + + Status + + ReceiveCounter + UINT + 65664 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 576 + + + ActualVelocity + INT + 608 + + + + Status + + ReceiveCounter + UINT + 65680 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 640 + + + ErrorRegister4001 + INT + 648 + 1 + + + TempPowerAmp + INT + 664 + 3 + + + I2TRate + USINT + 680 + 5 + + + + Status + + ReceiveCounter + UINT + 65696 + + + + + TxPDO 4 + 82 + + Inputs + + CurrentFiltered + DINT + 704 + + + Voltage + UDINT + 736 + 4 + + + + Status + + ReceiveCounter + UINT + 65712 + + + + + RxPDO 1 + 42 + + Outputs + + ControlWord + UINT + 512 + + + + Control + + SendCounter + UINT + 65664 + + + + + RxPDO 2 + 42 + + Outputs + + ProfilePos_TargetPos + DINT + 576 + + + ProfilePos_Deceleration + UDINT + 608 + + + + Control + + SendCounter + UINT + 65680 + + + + + RxPDO 3 + 42 + + Outputs + + ProfilePos_TargetVel + UDINT + 640 + + + ProfilePos_Acceleration + UDINT + 672 + + + + Control + + SendCounter + UINT + 65696 + + + + + RxPDO 4 + 42 + + Outputs + + ModeOfOperation + SINT + 704 + + + ProfileVel_TargetVelocity + DINT + 712 + + + + Control + + SendCounter + UINT + 65712 + + + + + + + DriveLane_16 + 41 + + Inputs + + NodeState + + USINT + 61568 + + + DiagFlag + + BIT + 64912 + + + EmergencyCounter + + USINT + 62592 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + StatusWord + UINT + 768 + + + + Status + + ReceiveCounter + UINT + 65728 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 832 + + + ActualVelocity + INT + 864 + + + + Status + + ReceiveCounter + UINT + 65744 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 896 + + + ErrorRegister4001 + INT + 904 + 1 + + + TempPowerAmp + INT + 920 + 3 + + + I2TRate + USINT + 936 + 5 + + + + Status + + ReceiveCounter + UINT + 65760 + + + + + TxPDO 4 + 82 + + Inputs + + CurrentFiltered + DINT + 960 + + + Voltage + UDINT + 992 + 4 + + + + Status + + ReceiveCounter + UINT + 65776 + + + + + RxPDO 1 + 42 + + Outputs + + ControlWord + UINT + 768 + + + + Control + + SendCounter + UINT + 65728 + + + + + RxPDO 2 + 42 + + Outputs + + ProfilePos_TargetPos + DINT + 832 + + + ProfilePos_Deceleration + UDINT + 864 + + + + Control + + SendCounter + UINT + 65744 + + + + + RxPDO 3 + 42 + + Outputs + + ProfilePos_TargetVel + UDINT + 896 + + + ProfilePos_Acceleration + UDINT + 928 + + + + Control + + SendCounter + UINT + 65760 + + + + + RxPDO 4 + 42 + + Outputs + + ProfileVel_TargetVelocity + DINT + 960 + + + ModeOfOperation + SINT + 992 + + + + Control + + SendCounter + UINT + 65776 + + + + + + + Bms_32 + 41 + + Inputs + + NodeState + + USINT + 61696 + + + DiagFlag + + BIT + 64928 + + + EmergencyCounter + + USINT + 62720 + + + + Outputs + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + Pack_V_Sum + UINT + 1024 + + + Pack_I_Master + DINT + 1040 + 2 + + + BmsState + USINT + 1072 + 6 + + + + Status + + ReceiveCounter + UINT + 65792 + + + + + TxPDO 2 + 82 + + Inputs + + Cell_T_Min + SINT + 1088 + + + Cell_T_Max + SINT + 1096 + 1 + + + SOC + UINT + 1104 + 2 + + + Cell_V_Max + UINT + 1120 + 4 + + + Cell_V_Min + UINT + 1136 + 6 + + + + Status + + ReceiveCounter + UINT + 65808 + + + + + TxPDO 3 + 82 + + Inputs + + ConfigVersion + DINT + 1152 + + + + Status + + ReceiveCounter + UINT + 65824 + + + + + RxPDO 1 + 42 + + Outputs + + EnableCharge + BYTE + 1024 + + + EnableHeating + BYTE + 1032 + + + + Control + + SendCounter + UINT + 65792 + + + + + + + + + + + + + +
+
+
+
diff --git a/plc/example/example/smallproject/PlcTask.TcTTO b/plc/example/example/smallproject/PlcTask.TcTTO new file mode 100644 index 0000000..29574dc --- /dev/null +++ b/plc/example/example/smallproject/PlcTask.TcTTO @@ -0,0 +1,17 @@ + + + + + 10000 + 20 + + MAIN + + {e75eccf1-4734-4003-a381-908429ec142e} + {531d44a7-3855-4784-9564-19c40ec016bb} + {b58bce52-91c0-4e9c-a208-8cc264db9b28} + {27696615-41f8-4e06-9e6b-d4c59aeee840} + {1c86b903-743e-4e71-b426-12bb7d8e1796} + + + \ No newline at end of file diff --git a/plc/example/example/smallproject/smallproject.plcproj b/plc/example/example/smallproject/smallproject.plcproj new file mode 100644 index 0000000..b4541f6 --- /dev/null +++ b/plc/example/example/smallproject/smallproject.plcproj @@ -0,0 +1,94 @@ + + + + 1.0.0.0 + 2.0 + {84419b4d-a906-4a7e-b105-28b655a900f8} + True + true + true + false + smallproject + 3.1.4024.0 + {fb64cf40-248d-4842-835d-2d98102ff47d} + {bfde0c85-6d1d-4c28-95cb-9059e79287bd} + {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} + {60a29fff-f477-4dd6-bc68-20a3e3286849} + {f2821ad3-d81b-4c74-a01a-71474780814f} + {c34386ea-03e6-4409-9a3f-3bcbf5806004} + + + + Code + + + Code + true + + + Code + + + Code + + + + + + + + + + + Tc2_Standard, * (Beckhoff Automation GmbH) + Tc2_Standard + + + Tc2_System, * (Beckhoff Automation GmbH) + Tc2_System + + + Tc3_Module, * (Beckhoff Automation GmbH) + Tc3_Module + + + + + Content + + + + + + + + "<ProjectRoot>" + + {40450F57-0AA3-4216-96F3-5444ECB29763} + + "{40450F57-0AA3-4216-96F3-5444ECB29763}" + + + ActiveVisuProfile + IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= + + + {192FAD59-8248-4824-A8DE-9177C94C195A} + + "{192FAD59-8248-4824-A8DE-9177C94C195A}" + + + + + + + + + System.Collections.Hashtable + {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} + System.String + + + + + \ No newline at end of file From e190bd7958f5f9db81837562ce5b0a2cf93f9130 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:38:08 +1000 Subject: [PATCH 17/24] chore: commit staged files --- misc/make_auto_complete.ps1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 misc/make_auto_complete.ps1 diff --git a/misc/make_auto_complete.ps1 b/misc/make_auto_complete.ps1 new file mode 100644 index 0000000..cdb20e2 --- /dev/null +++ b/misc/make_auto_complete.ps1 @@ -0,0 +1,16 @@ +Register-ArgumentCompleter -Native -CommandName make -ScriptBlock { + param($wordToComplete, $commandAst, $cursorPosition) + + # Check if a Makefile exists in the current directory + if (Test-Path .\Makefile) { + # Parse targets (lines starting with a word followed by a colon) + # Filters out comments, internal targets (starting with .), and variables + Get-Content .\Makefile | + Where-Object { $_ -match '^[a-zA-Z0-9_-]+\s*:' } | + ForEach-Object { $_.Split(':')[0].Trim() } | + Where-Object { $_ -like "$wordToComplete*" } | + ForEach-Object { + [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) + } + } +} \ No newline at end of file From bb8b61c8168b9b12c3e9644f6b3603fff1f1a770 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:48:22 +1000 Subject: [PATCH 18/24] chore(testing/plc): reorganize example project into src/ and add AdsGo example Move example files into plc/example/src/, rename solution/project, add AdsGo example solution/project, move smallproject contents (GVL, POUs, Tasks, DUTs), and update TESTING.md. --- .../{example.sln => AdsGo_Example.sln} | 175 +- .../AdsGo_Example.tsproj} | 15830 ++++++++-------- .../GLOBAL.TcGVL => src/Globals/Global.TcGVL} | 64 +- .../MAIN.TcPOU => src/Programs/Main.TcPOU} | 112 +- .../SmallProject.plcproj} | 188 +- .../smallproject => src/Tasks}/PlcTask.TcTTO | 31 +- .../DUTs => src/Types}/DUTSample.TcDUT | 24 +- 7 files changed, 8214 insertions(+), 8210 deletions(-) rename plc/example/{example.sln => AdsGo_Example.sln} (89%) rename plc/example/{example/example.tsproj => src/AdsGo_Example.tsproj} (97%) rename plc/example/{example/smallproject/GVLs/GLOBAL.TcGVL => src/Globals/Global.TcGVL} (88%) rename plc/example/{example/smallproject/POUs/MAIN.TcPOU => src/Programs/Main.TcPOU} (89%) rename plc/example/{example/smallproject/smallproject.plcproj => src/SmallProject.plcproj} (93%) rename plc/example/{example/smallproject => src/Tasks}/PlcTask.TcTTO (85%) rename plc/example/{example/smallproject/DUTs => src/Types}/DUTSample.TcDUT (96%) diff --git a/plc/example/example.sln b/plc/example/AdsGo_Example.sln similarity index 89% rename from plc/example/example.sln rename to plc/example/AdsGo_Example.sln index b510765..29e3851 100644 --- a/plc/example/example.sln +++ b/plc/example/AdsGo_Example.sln @@ -1,86 +1,89 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# TcXaeShell Solution File, Format Version 11.00 -VisualStudioVersion = 15.0.28307.2092 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "example", "example\example.tsproj", "{DB567925-AE3D-481C-8033-6FB9C6490B8D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) - Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) - Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) - Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) - Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) - Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) - Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) - Release|Any CPU = Release|Any CPU - Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) - Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) - Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) - Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) - Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) - Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) - Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x86) - {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.Build.0 = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) - {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {6ED517DE-02ED-425B-B7FD-97E5B120036F} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# TcXaeShell Solution File, Format Version 11.00 +VisualStudioVersion = 15.0.28307.2092 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{B1E792BE-AA5F-4E3C-8C82-674BF9C0715B}") = "AdsGo_Example", "src\AdsGo_Example.tsproj", "{DB567925-AE3D-481C-8033-6FB9C6490B8D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|TwinCAT CE7 (ARMV7) = Debug|TwinCAT CE7 (ARMV7) + Debug|TwinCAT OS (ARMT2) = Debug|TwinCAT OS (ARMT2) + Debug|TwinCAT OS (x64) = Debug|TwinCAT OS (x64) + Debug|TwinCAT RT (x64) = Debug|TwinCAT RT (x64) + Debug|TwinCAT RT (x86) = Debug|TwinCAT RT (x86) + Debug|TwinCAT UM (x64) = Debug|TwinCAT UM (x64) + Debug|TwinCAT UM (x86) = Debug|TwinCAT UM (x86) + Release|Any CPU = Release|Any CPU + Release|TwinCAT CE7 (ARMV7) = Release|TwinCAT CE7 (ARMV7) + Release|TwinCAT OS (ARMT2) = Release|TwinCAT OS (ARMT2) + Release|TwinCAT OS (x64) = Release|TwinCAT OS (x64) + Release|TwinCAT RT (x64) = Release|TwinCAT RT (x64) + Release|TwinCAT RT (x86) = Release|TwinCAT RT (x86) + Release|TwinCAT UM (x64) = Release|TwinCAT UM (x64) + Release|TwinCAT UM (x86) = Release|TwinCAT UM (x86) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|Any CPU.Build.0 = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x64).Build.0 = Debug|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.ActiveCfg = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|Any CPU.Build.0 = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x64).Build.0 = Release|TwinCAT RT (x64) + {DB567925-AE3D-481C-8033-6FB9C6490B8D}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|Any CPU.ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).ActiveCfg = Debug|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT CE7 (ARMV7).Build.0 = Debug|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (ARMT2).Build.0 = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT OS (x64).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x64).Build.0 = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).ActiveCfg = Debug|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT RT (x86).Build.0 = Debug|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).ActiveCfg = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x64).Build.0 = Debug|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Debug|TwinCAT UM (x86).ActiveCfg = Debug|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|Any CPU.ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).ActiveCfg = Release|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT CE7 (ARMV7).Build.0 = Release|TwinCAT CE7 (ARMV7) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (ARMT2).Build.0 = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT OS (x64).ActiveCfg = Release|TwinCAT OS (ARMT2) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).ActiveCfg = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x64).Build.0 = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).ActiveCfg = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT RT (x86).Build.0 = Release|TwinCAT RT (x86) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).ActiveCfg = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x64).Build.0 = Release|TwinCAT RT (x64) + {84419B4D-A906-4A7E-B105-28B655A900F8}.Release|TwinCAT UM (x86).ActiveCfg = Release|TwinCAT OS (ARMT2) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6ED517DE-02ED-425B-B7FD-97E5B120036F} + EndGlobalSection +EndGlobal diff --git a/plc/example/example/example.tsproj b/plc/example/src/AdsGo_Example.tsproj similarity index 97% rename from plc/example/example/example.tsproj rename to plc/example/src/AdsGo_Example.tsproj index 2631375..ab22c54 100644 --- a/plc/example/example/example.tsproj +++ b/plc/example/src/AdsGo_Example.tsproj @@ -1,7915 +1,7915 @@ - - - - - ARRAY [0..1] OF BIT - 2 - BIT - - 0 - 2 - - - - ARRAY [0..2] OF BIT - 3 - BIT - - 0 - 3 - - - - ARRAY [0..10] OF BIT - 11 - BIT - - 0 - 11 - - - - ARRAY [0..13] OF BIT - 14 - BIT - - 0 - 14 - - - - ARRAY [0..0] OF BYTE - 8 - BYTE - - 0 - 1 - - - - ARRAY [0..3] OF BIT - 4 - BIT - - 0 - 4 - - - - FSOE_11 - 88 - - FSoE CMD - USINT - 8 - 0 - - - FSoE Data 0 - BITARR16 - 16 - 8 - - - FSoE CRC_0 - UINT - 16 - 24 - - - FSoE Data 1 - BITARR16 - 16 - 40 - - - FSoE CRC_1 - UINT - 16 - 56 - - - FSoE ConnID - UINT - 16 - 72 - - - - FSOE_27 - 216 - - FSoE CMD - USINT - 8 - 0 - - - FSoE Data 0 - BITARR16 - 16 - 8 - - - FSoE CRC_0 - UINT - 16 - 24 - - - FSoE Data 1 - BITARR16 - 16 - 40 - - - FSoE CRC_1 - UINT - 16 - 56 - - - FSoE Data 2 - BITARR16 - 16 - 72 - - - FSoE CRC_2 - UINT - 16 - 88 - - - FSoE Data 3 - BITARR16 - 16 - 104 - - - FSoE CRC_3 - UINT - 16 - 120 - - - FSoE Data 4 - BITARR16 - 16 - 136 - - - FSoE CRC_4 - UINT - 16 - 152 - - - FSoE Data 5 - BITARR16 - 16 - 168 - - - FSoE CRC_5 - UINT - 16 - 184 - - - FSoE ConnID - UINT - 16 - 200 - - - - ARRAY [0..4] OF BIT - 5 - BIT - - 0 - 5 - - - - ARRAY [0..0] OF BIT - 1 - BIT - - 0 - 1 - - - - INFODATA_FB_3 - 24 - - State - USINT - 8 - 0 - - - Diag - UINT - 16 - 8 - - - - INFODATA_3_0_0 - 16 - - State - USINT - 8 - 0 - - - Diag - USINT - 8 - 8 - - - - INFODATA_0_1_0 - 8 - - Input Safe Data Byte 0 - BYTE - 8 - 0 - - - - ARRAY [0..6] OF BIT - 7 - BIT - - 0 - 7 - - - - ARRAY [0..5] OF BIT - 6 - BIT - - 0 - 6 - - - - ARRAY [0..1] OF BYTE - 16 - BYTE - - 0 - 2 - - - - - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ff808080808080808080808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff007fff007fff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000120b0000120b00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ff000000000000ff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ff000000000000ff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff008066008099008066008099008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffffff000000ffffff0000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff0000ff00ffff0000ff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00800000ffff008000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff - 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff - - - - - - - - - - - 2ms - - - 10ms - - - 200ms - - - FileWriterTask - - - PlcTask - - - - - - - smallproject Instance - {08500001-0000-0000-F000-000000000064} - - - 0 - PlcTask - - #x02010070 - - 20 - 10000000 - - - - - - - - - - - Device 1 (EtherCAT) - - -
-801112064
- 131072 - 8192 - 0 - 3 - 0 - 5612 - 20480 - -
0
- 4096 - 12288 - 2 - 0 - 1 -
- 128 - 1024 - 32 - 768 - 64 - 512 - 16 - 640 - - -1350027980 - 1 - 256 - -
-
- - Image - - - TermEtherCAT (EK1200) - 1000 - - - TermPower1 (EL9222-5500) - 1001 - - 001080002600010001000000400080008000001026010000 - 801080002200010002000000400080008000801022010000 - 001104002400010003000000000000000400001124010000 - 801108002000010004000000000000000800801120010000 - 0000000000000000001100020100000001000000000000000000000000000000 - 0000000000000000801100010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - Term 12 (EL9222-5500) - 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 - 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - - - - - - TermOutput (EL2008) - 1002 - - 000f01004400010003000000000000000000000f44090000 - 0000000000000000000f00020100000001000000000000000000000000000000 - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - BIT - - - - - - TermSensorGnrl (EL6224) - 1003 - - - - GenericV - - Lift - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x5532a948 - - - - SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml - SICK AG - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png - AHM36B-BAQC012x12 - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png - Encoders - Absolute Encoder Multiturn - 0x00000720 - 0x00000020 - 008001D60000001A000011012087000000000000 - - Direct Parameters 1 - V_DirectParameters_1 - 0x0 - 16 - - Reserved - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Master Cycle Time - 0x2 - UINT8 - 8 - 112 - 32 - - rw - - - - Min Cycle Time - 0x3 - UINT8 - 8 - 104 - 32 - - rw - - - - M-Sequence Capability - 0x4 - UINT8 - 8 - 96 - 41 - - rw - - - - IO-Link Version ID - 0x5 - UINT8 - 8 - 88 - 17 - - rw - - - - Process Data Input Length - 0x6 - UINT8 - 8 - 80 - 135 - - rw - - - - Process Data Output Length - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Vendor ID 1 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Vendor ID 2 - 0x9 - UINT8 - 8 - 56 - 26 - - rw - - - - Device ID 1 - 0xa - UINT8 - 8 - 48 - 128 - - rw - - - - Device ID 2 - 0xb - UINT8 - 8 - 40 - 1 - - rw - - - - Device ID 3 - 0xc - UINT8 - 8 - 32 - 214 - - rw - - - - Reserved - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Reserved - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Reserved - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - System Command - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Direct Parameters 2 - V_DirectParameters_2 - 0x1 - 16 - - Device Specific Parameter 1 - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Device Specific Parameter 2 - 0x2 - UINT8 - 8 - 112 - 0 - - rw - - - - Device Specific Parameter 3 - 0x3 - UINT8 - 8 - 104 - 0 - - rw - - - - Device Specific Parameter 4 - 0x4 - UINT8 - 8 - 96 - 0 - - rw - - - - Device Specific Parameter 5 - 0x5 - UINT8 - 8 - 88 - 0 - - rw - - - - Device Specific Parameter 6 - 0x6 - UINT8 - 8 - 80 - 0 - - rw - - - - Device Specific Parameter 7 - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Device Specific Parameter 8 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Device Specific Parameter 9 - 0x9 - UINT8 - 8 - 56 - 0 - - rw - - - - Device Specific Parameter 10 - 0xa - UINT8 - 8 - 48 - 0 - - rw - - - - Device Specific Parameter 11 - 0xb - UINT8 - 8 - 40 - 0 - - rw - - - - Device Specific Parameter 12 - 0xc - UINT8 - 8 - 32 - 0 - - rw - - - - Device Specific Parameter 13 - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Device Specific Parameter 14 - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Device Specific Parameter 15 - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - Device Specific Parameter 16 - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - - - Standard Command - V_SystemCommand - 0x2 - 1 - - Standard Command - 0x0 - UINT8 - 8 - 0 - 0 - - wo - - - 0x82 - Restore Factory Settings - - - 0x80 - Device Reset - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Device Access Locks - V_DeviceAccessLocks - 0xc - 2 - - Parameter (write) Access Lock - 0x1 - BOOL - 1 - 0 - - - rw s - - - - Data Storage Lock - 0x2 - BOOL - 1 - 1 - - - rw s - - - - Local Parameterization Lock - 0x3 - BOOL - 1 - 2 - - - rw s - - - - Local User Interface Lock - 0x4 - BOOL - 1 - 3 - - - rw s - - - - - Vendor Name - V_VendorName - 0x10 - 64 - - Vendor Name - 0x0 - String - 512 - 0 - SICK AG - SICK AG - ro - - - - - Vendor Text - V_VendorText - 0x11 - 64 - - Vendor Text - 0x0 - String - 512 - 0 - SICK Sensor Intelligence. - SICK Sensor Intelligence. - ro - - - - - Product Name - V_ProductName - 0x12 - 64 - - Product Name - 0x0 - String - 512 - 0 - AHM36B-BDQC012X12 - - ro - - - - - Product ID - V_ProductID - 0x13 - 64 - - Product ID - 0x0 - String - 512 - 0 - 1092007 - - ro - - - - - Product Text - V_ProductText - 0x14 - 64 - - Product Text - 0x0 - String - 512 - 0 - Absolute Encoder Multiturn - Absolute Encoder Multiturn - ro - - - - - Serial Number - V_SerialNumber - 0x15 - 16 - - Serial Number - 0x0 - String - 128 - 0 - 20230078 - - ro - - - - - Hardware Version - V_HardwareRevision - 0x16 - 64 - - Hardware Version - 0x0 - String - 512 - 0 - 1.0 - 1.0 - ro - - - - - Firmware Version - V_FirmwareRevision - 0x17 - 64 - - Firmware Version - 0x0 - String - 512 - 0 - 1.1.0.1746R - - ro - - - - - Application Specific Tag - V_ApplicationSpecificTag - 0x18 - 32 - - Application Specific Tag - 0x0 - String - 256 - 0 - *** - *** - rw - - - - - Device Status - V_DeviceStatus - 0x24 - 1 - - Device Status - 0x0 - UINT8 - 8 - 0 - 0 - - ro - - - 5 - 255 - Reserved - - - - - PositionVelocity - V_ProcessDataInput - 0x28 - 8 - - Position - 0x1 - UINT32 - 32 - 0 - - - ro s - - - - Velocity - 0x2 - INT32 - 32 - 32 - - - ro s - - - - - Profile Characteristic - V_ProfileIdentifier - 0xd - 8 - - Profile Characteristic - 0x1 - UINT16 - 16 - 48 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x2 - UINT16 - 16 - 32 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x3 - UINT16 - 16 - 16 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x4 - UINT16 - 16 - 0 - - - ro - see IO-Link Interface Specification - - - - PDInputDescriptor - V_PDInputDescriptor - 0xe - 6 - - Position - 0x1 - OctetString - 24 - 24 - - - ro s - see IO-Link Interface Specification - - - Velocity - 0x2 - OctetString - 24 - 0 - - - ro s - see IO-Link Interface Specification - - - - Device Specific Tag - V_DeviceSpecificTag - 0x40 - 16 - - Device Specific Tag - 0x0 - String - 128 - 0 - *** - *** - rw - see IO-Link Interface Specification - - - - Velocity Value - V_VelocityValue - 0x41 - 4 - - Velocity Value - 0x0 - INT32 - 32 - 0 - 0 - - ro - see IO-Link Interface Specification - - - - Velocity Format - V_VelocityFormat - 0x42 - 1 - - Velocity Format - 0x0 - UINT8 - 8 - 0 - 3 - 3 - rw - The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. - - 0x0 - Counts per second [cps] - - - 0x1 - Counts per 100ms [cp100ms] - - - 0x2 - Counts per 10ms [cp10ms] - - - 0x3 - Rounds per minute [rpm] - - - 0x4 - Rounds per second [rps] - - - - - Velocity Update Time - V_VelocityUpdateTime - 0x43 - 4 - - Velocity Update Time - 0x0 - UINT32 - 32 - 0 - 2 - 2 - rw - The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. - - 1 - 50 - Velocity update time range. - - - - - Velocity Integration Time - V_VelocityIntegrationTime - 0x44 - 4 - - Velocity Integration Time - 0x0 - UINT32 - 32 - 0 - 200 - 200 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 200 - Velocity integration time range. - - - - - Counts per Revolution - V_CountsPerRevolution - 0x51 - 4 - - Counts per Revolution - 0x0 - UINT32 - 32 - 0 - 4096 - 4096 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 4096 - Value range for counts per revolution. - - - - - Total Measuring Range - V_TotalMeasuringRange - 0x52 - 4 - - Total Measuring Range - 0x0 - UINT32 - 32 - 0 - 16777216 - 16777216 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 16777216 - Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. - - - - - Preset Value - V_PresetValue - 0x53 - 4 - - Preset Value - 0x0 - UINT32 - 32 - 0 - 100100 - - wo - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 0 - 16777215 - Preset Value range. - - - - - Position Value - V_PositionValue - 0x54 - 4 - - Position Value - 0x0 - UINT32 - 32 - 0 - 100100 - - ro - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - - - Counting Direction - V_CountingDirection - 0x55 - 1 - - Counting Direction - 0x0 - UINT8 - 8 - 0 - 0 - - rw - The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. - - 0x0 - Clockwise (cw) - - - 0x1 - Counter-clockwise (ccw) - - - - - RawPosition - V_RawPosition - 0x56 - 4 - - RawPosition - 0x0 - UINT32 - 32 - 0 - 2205371 - 0 - ro - Raw position, with no offset or scaling modification. - - - - Total Measuring Range adjusted - V_TotalMeasuringRangeAdjusted - 0x5b - 4 - - Total Measuring Range adjusted - 0x0 - UINT32 - 32 - 0 - 16777216 - - ro - Raw position, with no offset or scaling modification. - - - - Status Flag A - V_StatusFlagA - 0x5c - 2 - - Status Flag A - 0x0 - UINT16 - 16 - 0 - 0 - - ro - Raw position, with no offset or scaling modification. - - - - SICK Profile Version - V_SICK_ProfileVersion - 0xcd - 4 - - SICK Profile Version - 0x0 - String - 32 - 0 - 1.00 - 1.00 - ro - Raw position, with no offset or scaling modification. - - - - 0x1800 - 0x0 - DS_DumyEvent - Event for Data Storage - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - 0x0 - - - - 0 - 0 - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - - - - SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml - SICK AG - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png - AHM36B-BAQC012x12 - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png - C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png - Encoders - Absolute Encoder Multiturn - 0x00000720 - 0x00000020 - 008001D60000001A000011012087000000000000 - - Direct Parameters 1 - V_DirectParameters_1 - 0x0 - 16 - - Reserved - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Master Cycle Time - 0x2 - UINT8 - 8 - 112 - 32 - - rw - - - - Min Cycle Time - 0x3 - UINT8 - 8 - 104 - 32 - - rw - - - - M-Sequence Capability - 0x4 - UINT8 - 8 - 96 - 41 - - rw - - - - IO-Link Version ID - 0x5 - UINT8 - 8 - 88 - 17 - - rw - - - - Process Data Input Length - 0x6 - UINT8 - 8 - 80 - 135 - - rw - - - - Process Data Output Length - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Vendor ID 1 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Vendor ID 2 - 0x9 - UINT8 - 8 - 56 - 26 - - rw - - - - Device ID 1 - 0xa - UINT8 - 8 - 48 - 128 - - rw - - - - Device ID 2 - 0xb - UINT8 - 8 - 40 - 1 - - rw - - - - Device ID 3 - 0xc - UINT8 - 8 - 32 - 214 - - rw - - - - Reserved - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Reserved - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Reserved - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - System Command - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Direct Parameters 2 - V_DirectParameters_2 - 0x1 - 16 - - Device Specific Parameter 1 - 0x1 - UINT8 - 8 - 120 - 0 - - rw - - - - Device Specific Parameter 2 - 0x2 - UINT8 - 8 - 112 - 0 - - rw - - - - Device Specific Parameter 3 - 0x3 - UINT8 - 8 - 104 - 0 - - rw - - - - Device Specific Parameter 4 - 0x4 - UINT8 - 8 - 96 - 0 - - rw - - - - Device Specific Parameter 5 - 0x5 - UINT8 - 8 - 88 - 0 - - rw - - - - Device Specific Parameter 6 - 0x6 - UINT8 - 8 - 80 - 0 - - rw - - - - Device Specific Parameter 7 - 0x7 - UINT8 - 8 - 72 - 0 - - rw - - - - Device Specific Parameter 8 - 0x8 - UINT8 - 8 - 64 - 0 - - rw - - - - Device Specific Parameter 9 - 0x9 - UINT8 - 8 - 56 - 0 - - rw - - - - Device Specific Parameter 10 - 0xa - UINT8 - 8 - 48 - 0 - - rw - - - - Device Specific Parameter 11 - 0xb - UINT8 - 8 - 40 - 0 - - rw - - - - Device Specific Parameter 12 - 0xc - UINT8 - 8 - 32 - 0 - - rw - - - - Device Specific Parameter 13 - 0xd - UINT8 - 8 - 24 - 0 - - rw - - - - Device Specific Parameter 14 - 0xe - UINT8 - 8 - 16 - 0 - - rw - - - - Device Specific Parameter 15 - 0xf - UINT8 - 8 - 8 - 0 - - rw - - - - Device Specific Parameter 16 - 0x10 - UINT8 - 8 - 0 - 0 - - rw - - - - - Standard Command - V_SystemCommand - 0x2 - 1 - - Standard Command - 0x0 - UINT8 - 8 - 0 - 0 - - wo - - - 0x82 - Restore Factory Settings - - - 0x80 - Device Reset - - - 0 - 63 - Reserved - - - 131 - 159 - Reserved - - - - - Device Access Locks - V_DeviceAccessLocks - 0xc - 2 - - Parameter (write) Access Lock - 0x1 - BOOL - 1 - 0 - - - rw s - - - - Data Storage Lock - 0x2 - BOOL - 1 - 1 - - - rw s - - - - Local Parameterization Lock - 0x3 - BOOL - 1 - 2 - - - rw s - - - - Local User Interface Lock - 0x4 - BOOL - 1 - 3 - - - rw s - - - - - Vendor Name - V_VendorName - 0x10 - 64 - - Vendor Name - 0x0 - String - 512 - 0 - SICK AG - SICK AG - ro - - - - - Vendor Text - V_VendorText - 0x11 - 64 - - Vendor Text - 0x0 - String - 512 - 0 - SICK Sensor Intelligence. - SICK Sensor Intelligence. - ro - - - - - Product Name - V_ProductName - 0x12 - 64 - - Product Name - 0x0 - String - 512 - 0 - AHM36B-BDQC012X12 - - ro - - - - - Product ID - V_ProductID - 0x13 - 64 - - Product ID - 0x0 - String - 512 - 0 - 1092007 - - ro - - - - - Product Text - V_ProductText - 0x14 - 64 - - Product Text - 0x0 - String - 512 - 0 - Absolute Encoder Multiturn - Absolute Encoder Multiturn - ro - - - - - Serial Number - V_SerialNumber - 0x15 - 16 - - Serial Number - 0x0 - String - 128 - 0 - 20230115 - - ro - - - - - Hardware Version - V_HardwareRevision - 0x16 - 64 - - Hardware Version - 0x0 - String - 512 - 0 - 1.0 - 1.0 - ro - - - - - Firmware Version - V_FirmwareRevision - 0x17 - 64 - - Firmware Version - 0x0 - String - 512 - 0 - 1.1.0.1746R - - ro - - - - - Application Specific Tag - V_ApplicationSpecificTag - 0x18 - 32 - - Application Specific Tag - 0x0 - String - 256 - 0 - *** - *** - rw - - - - - Device Status - V_DeviceStatus - 0x24 - 1 - - Device Status - 0x0 - UINT8 - 8 - 0 - 0 - - ro - - - 5 - 255 - Reserved - - - - - PositionVelocity - V_ProcessDataInput - 0x28 - 8 - - Position - 0x1 - UINT32 - 32 - 0 - - - ro s - - - - Velocity - 0x2 - INT32 - 32 - 32 - - - ro s - - - - - Profile Characteristic - V_ProfileIdentifier - 0xd - 8 - - Profile Characteristic - 0x1 - UINT16 - 16 - 48 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x2 - UINT16 - 16 - 32 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x3 - UINT16 - 16 - 16 - - - ro - see IO-Link Interface Specification - - - Profile Characteristic - 0x4 - UINT16 - 16 - 0 - - - ro - see IO-Link Interface Specification - - - - PDInputDescriptor - V_PDInputDescriptor - 0xe - 6 - - Position - 0x1 - OctetString - 24 - 24 - - - ro s - see IO-Link Interface Specification - - - Velocity - 0x2 - OctetString - 24 - 0 - - - ro s - see IO-Link Interface Specification - - - - Device Specific Tag - V_DeviceSpecificTag - 0x40 - 16 - - Device Specific Tag - 0x0 - String - 128 - 0 - *** - *** - rw - see IO-Link Interface Specification - - - - Velocity Value - V_VelocityValue - 0x41 - 4 - - Velocity Value - 0x0 - INT32 - 32 - 0 - 0 - - ro - see IO-Link Interface Specification - - - - Velocity Format - V_VelocityFormat - 0x42 - 1 - - Velocity Format - 0x0 - UINT8 - 8 - 0 - 3 - 3 - rw - The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. - - 0x0 - Counts per second [cps] - - - 0x1 - Counts per 100ms [cp100ms] - - - 0x2 - Counts per 10ms [cp10ms] - - - 0x3 - Rounds per minute [rpm] - - - 0x4 - Rounds per second [rps] - - - - - Velocity Update Time - V_VelocityUpdateTime - 0x43 - 4 - - Velocity Update Time - 0x0 - UINT32 - 32 - 0 - 2 - 2 - rw - The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. - - 1 - 50 - Velocity update time range. - - - - - Velocity Integration Time - V_VelocityIntegrationTime - 0x44 - 4 - - Velocity Integration Time - 0x0 - UINT32 - 32 - 0 - 200 - 200 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 200 - Velocity integration time range. - - - - - Counts per Revolution - V_CountsPerRevolution - 0x51 - 4 - - Counts per Revolution - 0x0 - UINT32 - 32 - 0 - 4096 - 4096 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 4096 - Value range for counts per revolution. - - - - - Total Measuring Range - V_TotalMeasuringRange - 0x52 - 4 - - Total Measuring Range - 0x0 - UINT32 - 32 - 0 - 16777216 - 16777216 - rw - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 1 - 16777216 - Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. - - - - - Preset Value - V_PresetValue - 0x53 - 4 - - Preset Value - 0x0 - UINT32 - 32 - 0 - 0 - - wo - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - 0 - 16777215 - Preset Value range. - - - - - Position Value - V_PositionValue - 0x54 - 4 - - Position Value - 0x0 - UINT32 - 32 - 0 - 16777047 - - ro - The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. - - - - Counting Direction - V_CountingDirection - 0x55 - 1 - - Counting Direction - 0x0 - UINT8 - 8 - 0 - 0 - - rw - The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. - - 0x0 - Clockwise (cw) - - - 0x1 - Counter-clockwise (ccw) - - - - - RawPosition - V_RawPosition - 0x56 - 4 - - RawPosition - 0x0 - UINT32 - 32 - 0 - 2519491 - 0 - ro - Raw position, with no offset or scaling modification. - - - - Total Measuring Range adjusted - V_TotalMeasuringRangeAdjusted - 0x5b - 4 - - Total Measuring Range adjusted - 0x0 - UINT32 - 32 - 0 - 16777216 - - ro - Raw position, with no offset or scaling modification. - - - - Status Flag A - V_StatusFlagA - 0x5c - 2 - - Status Flag A - 0x0 - UINT16 - 16 - 0 - 0 - - ro - Raw position, with no offset or scaling modification. - - - - SICK Profile Version - V_SICK_ProfileVersion - 0xcd - 4 - - SICK Profile Version - 0x0 - String - 32 - 0 - 1.00 - 1.00 - ro - Raw position, with no offset or scaling modification. - - - - 0x1800 - 0x0 - DS_DumyEvent - Event for Data Storage - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - ME_IdentificationMenu - Identification Menu - - 0x0 - 0x0 - - V_VendorName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductName - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductID - 0 - 0.000000 - 0.000000 - - - - - - - V_ProductText - 0 - 0.000000 - 0.000000 - - ro - - - - - V_SerialNumber - 0 - 0.000000 - 0.000000 - - - - - - - V_HardwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_FirmwareRevision - 0 - 0.000000 - 0.000000 - - ro - - - - - V_ApplicationSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - V_DeviceSpecificTag - 0 - 0.000000 - 0.000000 - - - - - - - - ME_ParameterMenu - Parameter Menu - - 0x0 - 0x0 - - V_CountsPerRevolution - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRange - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_TotalMeasuringRangeAdjusted - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_PresetValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_RawPosition - 0 - 0.000000 - 0.000000 - - ro - Hex - - - - V_CountingDirection - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityFormat - 0 - 0.000000 - 0.000000 - - - - - - - V_VelocityUpdateTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_VelocityIntegrationTime - 0 - 0.000000 - 0.000000 - ms - - - - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 128 - - - V_SystemCommand - 0 - 0.000000 - 0.000000 - - wo - Button - 130 - - - - ME_ObservationMenu - Observation Menu - - 0x0 - 0x0 - - V_PositionValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - V_VelocityValue - 0 - 0.000000 - 0.000000 - - - Dec - - - - ME_DirectParameters - Direct Parameters - - 0x0 - 0x0 - - V_DirectParameters_1 - 0 - 0.000000 - 0.000000 - - - - - - - V_DirectParameters_2 - 0 - 0.000000 - 0.000000 - - - - - - - - - ME_DiagnosisMenu - Diagnosis Menu - - 0x0 - 0x0 - - V_DeviceStatus - 0 - 0.000000 - 0.000000 - - - - - - - V_StatusFlagA - 0 - 0.000000 - 0.000000 - - - - - - - - - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - 0x0 - - - - 0 - 0 - - Position - 0x20 - 0x0 - UINT32 - - - Velocity - 0x20 - 0x20 - INT32 - - - - - - - GenericP - - GenericV - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001710000000000000 - - - - - - - 0x5532a0f0 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 00131c002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b00000000000000000000000000000000000000000000003010800114000000d60180001a0000001101200087000000000003004f626a656374203830313000 - 020003001c0000000b00000000000000000000000000000000000000000000003020800114000000d60180001a0000001101200087000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - DINT - - - UDINT - - - - - DINT - - - UDINT - - - - - UINT - - - - - - - - - - TermPower2 (EL9222-5500) - 1001 - - 001080002600010001000000400080008000001026010000 - 801080002200010002000000400080008000801022010000 - 001104002400010003000000000000000400001124010000 - 801108002000010004000000000000000800801120010000 - 0000000000000000001100020100000001000000000000000000000000000000 - 0000000000000000801100010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - Term 15 (EL9222-5500) - 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 - 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 - 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - BIT - - - BIT - - - BIT2 - - - ARRAY [0..1] OF BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..10] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..13] OF BIT - - - - - - - - - - TermSensorFront (EL6224) - 1003 - - - - GenericV - - ObjFrL - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001783000000000000 - - - - - - - 0x28040aa8 - - - - - GenericV - - ObjFrR - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x1146eb68 - - - - - GenericV - - VertFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x1146eb68 - - - - - GenericV - - HorizFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x1146eb68 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 001316002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - - - - - - TermSensorBack (EL6224) - 1003 - - - - GenericV - - ObjBkL - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - GenericV - - ObjBkR - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - GenericV - - VertBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - GenericV - - HorizBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d57660 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 001316002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - - - - - - TermSensorEndstop (EL6224) - 1003 - - - - GenericV - - EndStopLFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - GenericV - - EndStopLBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - GenericV - - EndStopMFr - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - GenericV - - EndStopMBk - - - - - 0x00000717 - 0x77a24540 - 0000000000000000000010001783000000000000 - - - - - - - 0x69d59a88 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 001316002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - UDINT - - - - - - - - - - Pr - 1003 - - - - GenericV - - PrLnFr - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eba00 - - - - - GenericV - - PrLnBk - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eac18 - - - - - GenericV - - PrMnFr - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eac18 - - - - - GenericV - - PrMnBk - - - - - - 0x00000717 - 0x00000100 - 0000000000000000000010001710000000000000 - - - - - - - 0x460eac18 - - - - - 001000012600010001000000400000010001001026010000 - 001100012200010002000000400000010001001122010000 - 001200002400000003000000000000000000001224000000 - 00130e002000010004000000000000000600001320010000 - 0000000000000000000000020000000001000000000000000000000000000000 - 0000000000000000001300010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 - 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 - 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170010000000000003004f626a656374203830303000 - 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170010000000000003004f626a656374203830313000 - 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170010000000000003004f626a656374203830323000 - 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 - - - ARRAY [0..0] OF BYTE - - - ARRAY [0..3] OF BIT - - - BIT - - - ARRAY [0..1] OF BIT - - - BIT - - - - - USINT - - - - USINT - - - - USINT - - - - USINT - - - - - - UINT - - - - - UINT - - - - - UINT - - - - - UINT - - - - - - - - - - TermSafety (EL2911) - 1004 - - 001000012600010001000000000100010001001026010000 - 001100012200010002000000000100010001001122010000 - 001234002400010003000000000000000700001224010000 - 001d23002000010004000000000000000900001d20010000 - 002e00002400000003000000000000000000002e24000000 - 002f00002000000004000000000000000000002f20000000 - fa2f01002400010003000000000000000200fa2f24010000 - 0000000000000000001200020100000001000000060000000200000000000000 - 0000000000000000001d00010100000002000000060000000300000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0000000000000000000000020000000001000000060000000400010000000000 - 0000000000000000000000010000000002000000060000000500010000000000 - 0000000000000000fa2f00020100000001000000060000000600020000000000 - 0010f400f410f400 - - - - - #x00000000 - #x00000000 - #x00000000 - #x00000000 - 004003000a00000000000000000000000000000000000000000000000000000020f3100502000000010000 - - - FSOE_11 - - - - - FSOE_27 - - - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..4] OF BIT - - - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..0] OF BIT - - - DINT - - - DINT - - - DINT - - - DINT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - BIT - - - ARRAY [0..2] OF BIT - - - UINT - - - UINT - - - - - INFODATA_FB_3 - - - - - INFODATA_3_0_0 - - - - - WORD - - - UDINT - - - INFODATA_0_1_0 - - - - - BIT - - - ARRAY [0..6] OF BIT - - - - - BIT - - - BIT - - - ARRAY [0..5] OF BIT - - - - - USINT - - - USINT - - - - - ARRAY [0..1] OF BYTE - - - - - - - 0000000001000400000000000000000000000000000000000000000000000000 - 2911 - - - 0000010001000400000000000000000000000000000000000000000000000000 - 200 - - Module 2 (FSOUT) - 409 - 02000000c8000000000004000000000000000000000000000000000000000000 - 6142 - - - - 0000010001000400000000000000000000000000000000000000000000000000 - 1950 - - Module 3 (DEVICEIO) - 409 - 020000009e070000000004000000000000000000000000000000000000000000 - 7166 - - - - 0000010001000400000000000000000000000000000000000000000000000000 - 691 - - Module 4 (FSLOGIC) - 409 - 02000000b3020000000004000000000000000000000000000000000000000000 - 7167 - 6143 - - - - - - - Term 31 (EL3062) - 1005 - - 001080002600010001000000800080008000001026010000 - 801080002200010002000000800080008000801022010000 - 001100000400000003000000000000000000001104000000 - 801108002000010004000000000000000800801120010000 - 0000000000000000801100010100000002000000000000000000000000000000 - 00000000000000000d0800010100000003000000000000000000000000000000 - 0010f400f410f400 - 030000000c00000002000000f103000000000000000000000000000000000000 - - #x1a01 - - BIT - - - - BIT - - - - BIT2 - - - - BIT2 - - - - BIT - - - - ARRAY [0..0] OF BIT - - - ARRAY [0..5] OF BIT - - - BIT - - - - BIT - - - - INT - - - - #x1a00 - - INT - - - - #x1a03 - - BIT - - - - BIT - - - - BIT2 - - - - BIT2 - - - - BIT - - - - ARRAY [0..0] OF BIT - - - ARRAY [0..5] OF BIT - - - BIT - - - - BIT - - - - INT - - - - #x1a02 - - INT - - - - - - - - Term 32 (EL9505) - 1006 - - 001001000000010004000000000000000000001000000000 - 0000000000000000001000010100000002000000000000000000000000000000 - - - BIT - - - BIT - - - - - - Term 18 (EL9011) - 1007 - - - - - -
- - CanopenMaster - - -
-801112064
- 65536 - 8192 - 0 - 3 - 0 - 5612 - 20480 -
-
- - Image - - - DriveLnMn_15 - 41 - - Inputs - - NodeState - - USINT - 61560 - - - DiagFlag - - BIT - 64911 - - - EmergencyCounter - - USINT - 62584 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - StatusWord - UINT - - - - Status - - ReceiveCounter - UINT - 65536 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 64 - - - ActualVelocity - INT - 96 - 4 - - - - Status - - ReceiveCounter - UINT - 65552 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 128 - - - ErrorRegister4001 - INT - 136 - 1 - - - TempPowerAmp - INT - 152 - 3 - - - I2TRate - USINT - 168 - 5 - - - - Status - - ReceiveCounter - UINT - 65568 - - - - - TxPDO 4 - 82 - - Inputs - - CurrentFiltered - DINT - 192 - - - Voltage - UDINT - 224 - 4 - - - - Status - - ReceiveCounter - UINT - 65584 - - - - - RxPDO 1 - 42 - - Outputs - - ControlWord - UINT - - - - Control - - SendCounter - UINT - 65536 - - - - - RxPDO 2 - 42 - - Outputs - - ProfilePos_TargetPos - DINT - 64 - - - ProfilePos_Deceleration - UDINT - 96 - - - - Control - - SendCounter - UINT - 65552 - - - - - RxPDO 3 - 42 - - Outputs - - ProfilePos_TargetVel - UDINT - 128 - - - ProfilePos_Acceleration - UDINT - 160 - - - - Control - - SendCounter - UINT - 65568 - - - - - RxPDO 4 - 42 - - Outputs - - ProfileVel_TargetVelocity - DINT - 192 - - - ModeOfOperation - SINT - 224 - - - - Control - - SendCounter - UINT - 65584 - - - - - - - Lift_18_Brake - 41 - - Inputs - - NodeState - - USINT - 61584 - - - DiagFlag - - BIT - 64914 - - - EmergencyCounter - - USINT - 62608 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - Statusword - UINT - 256 - - - - Status - - ReceiveCounter - UINT - 65600 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 320 - - - ActualVelocity - INT - 352 - - - - Status - - ReceiveCounter - UINT - 65616 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 384 - - - ErrorRegister_3001 - INT - 392 - - - TempPowerAmp - INT - 408 - 3 - - - I2TRate - USINT - 424 - 5 - - - - Status - - ReceiveCounter - UINT - 65632 - - - - - TxPDO 4 - 82 - - Inputs - - Actual_Voltage - UDINT - 448 - - - Actual_Current_Filtered - DINT - 480 - - - - Status - - ReceiveCounter - UINT - 65648 - - - - - RxPDO 1 - 42 - - Outputs - - Controlword - UINT - 256 - - - - Control - - SendCounter - UINT - 65600 - - - - - RxPDO 2 - 42 - - Outputs - - ModeOfOperation - SINT - 320 - - - Profile_Deceleration - UDINT - 328 - 1 - - - - Control - - SendCounter - UINT - 65616 - - - - - RxPDO 3 - 42 - - Outputs - - TargetVelocity_VelocityProfile - DINT - 384 - - - Profile_Acceleration - UDINT - 416 - - - - Control - - SendCounter - UINT - 65632 - - - - - RxPDO 4 - 42 - - Outputs - - TargetPosition - DINT - 448 - - - TargetVelocityProfilePosition - UDINT - 480 - - - - Control - - SendCounter - UINT - 65648 - - - - - - - DriveMain_17 - 41 - - Inputs - - NodeState - - USINT - 61576 - - - DiagFlag - - BIT - 64913 - - - EmergencyCounter - - USINT - 62600 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - StatusWord - UINT - 512 - - - - Status - - ReceiveCounter - UINT - 65664 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 576 - - - ActualVelocity - INT - 608 - - - - Status - - ReceiveCounter - UINT - 65680 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 640 - - - ErrorRegister4001 - INT - 648 - 1 - - - TempPowerAmp - INT - 664 - 3 - - - I2TRate - USINT - 680 - 5 - - - - Status - - ReceiveCounter - UINT - 65696 - - - - - TxPDO 4 - 82 - - Inputs - - CurrentFiltered - DINT - 704 - - - Voltage - UDINT - 736 - 4 - - - - Status - - ReceiveCounter - UINT - 65712 - - - - - RxPDO 1 - 42 - - Outputs - - ControlWord - UINT - 512 - - - - Control - - SendCounter - UINT - 65664 - - - - - RxPDO 2 - 42 - - Outputs - - ProfilePos_TargetPos - DINT - 576 - - - ProfilePos_Deceleration - UDINT - 608 - - - - Control - - SendCounter - UINT - 65680 - - - - - RxPDO 3 - 42 - - Outputs - - ProfilePos_TargetVel - UDINT - 640 - - - ProfilePos_Acceleration - UDINT - 672 - - - - Control - - SendCounter - UINT - 65696 - - - - - RxPDO 4 - 42 - - Outputs - - ModeOfOperation - SINT - 704 - - - ProfileVel_TargetVelocity - DINT - 712 - - - - Control - - SendCounter - UINT - 65712 - - - - - - - DriveLane_16 - 41 - - Inputs - - NodeState - - USINT - 61568 - - - DiagFlag - - BIT - 64912 - - - EmergencyCounter - - USINT - 62592 - - - - Outputs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - StatusWord - UINT - 768 - - - - Status - - ReceiveCounter - UINT - 65728 - - - - - TxPDO 2 - 82 - - Inputs - - ActualPosition - DINT - 832 - - - ActualVelocity - INT - 864 - - - - Status - - ReceiveCounter - UINT - 65744 - - - - - TxPDO 3 - 82 - - Inputs - - ModeOfOperation - SINT - 896 - - - ErrorRegister4001 - INT - 904 - 1 - - - TempPowerAmp - INT - 920 - 3 - - - I2TRate - USINT - 936 - 5 - - - - Status - - ReceiveCounter - UINT - 65760 - - - - - TxPDO 4 - 82 - - Inputs - - CurrentFiltered - DINT - 960 - - - Voltage - UDINT - 992 - 4 - - - - Status - - ReceiveCounter - UINT - 65776 - - - - - RxPDO 1 - 42 - - Outputs - - ControlWord - UINT - 768 - - - - Control - - SendCounter - UINT - 65728 - - - - - RxPDO 2 - 42 - - Outputs - - ProfilePos_TargetPos - DINT - 832 - - - ProfilePos_Deceleration - UDINT - 864 - - - - Control - - SendCounter - UINT - 65744 - - - - - RxPDO 3 - 42 - - Outputs - - ProfilePos_TargetVel - UDINT - 896 - - - ProfilePos_Acceleration - UDINT - 928 - - - - Control - - SendCounter - UINT - 65760 - - - - - RxPDO 4 - 42 - - Outputs - - ProfileVel_TargetVelocity - DINT - 960 - - - ModeOfOperation - SINT - 992 - - - - Control - - SendCounter - UINT - 65776 - - - - - - - Bms_32 - 41 - - Inputs - - NodeState - - USINT - 61696 - - - DiagFlag - - BIT - 64928 - - - EmergencyCounter - - USINT - 62720 - - - - Outputs - - - - - - - - - - - - TxPDO 1 - 82 - - Inputs - - Pack_V_Sum - UINT - 1024 - - - Pack_I_Master - DINT - 1040 - 2 - - - BmsState - USINT - 1072 - 6 - - - - Status - - ReceiveCounter - UINT - 65792 - - - - - TxPDO 2 - 82 - - Inputs - - Cell_T_Min - SINT - 1088 - - - Cell_T_Max - SINT - 1096 - 1 - - - SOC - UINT - 1104 - 2 - - - Cell_V_Max - UINT - 1120 - 4 - - - Cell_V_Min - UINT - 1136 - 6 - - - - Status - - ReceiveCounter - UINT - 65808 - - - - - TxPDO 3 - 82 - - Inputs - - ConfigVersion - DINT - 1152 - - - - Status - - ReceiveCounter - UINT - 65824 - - - - - RxPDO 1 - 42 - - Outputs - - EnableCharge - BYTE - 1024 - - - EnableHeating - BYTE - 1032 - - - - Control - - SendCounter - UINT - 65792 - - - - - - - - - - - - - -
-
-
-
+ + + + + ARRAY [0..1] OF BIT + 2 + BIT + + 0 + 2 + + + + ARRAY [0..2] OF BIT + 3 + BIT + + 0 + 3 + + + + ARRAY [0..10] OF BIT + 11 + BIT + + 0 + 11 + + + + ARRAY [0..13] OF BIT + 14 + BIT + + 0 + 14 + + + + ARRAY [0..0] OF BYTE + 8 + BYTE + + 0 + 1 + + + + ARRAY [0..3] OF BIT + 4 + BIT + + 0 + 4 + + + + FSOE_11 + 88 + + FSoE CMD + USINT + 8 + 0 + + + FSoE Data 0 + BITARR16 + 16 + 8 + + + FSoE CRC_0 + UINT + 16 + 24 + + + FSoE Data 1 + BITARR16 + 16 + 40 + + + FSoE CRC_1 + UINT + 16 + 56 + + + FSoE ConnID + UINT + 16 + 72 + + + + FSOE_27 + 216 + + FSoE CMD + USINT + 8 + 0 + + + FSoE Data 0 + BITARR16 + 16 + 8 + + + FSoE CRC_0 + UINT + 16 + 24 + + + FSoE Data 1 + BITARR16 + 16 + 40 + + + FSoE CRC_1 + UINT + 16 + 56 + + + FSoE Data 2 + BITARR16 + 16 + 72 + + + FSoE CRC_2 + UINT + 16 + 88 + + + FSoE Data 3 + BITARR16 + 16 + 104 + + + FSoE CRC_3 + UINT + 16 + 120 + + + FSoE Data 4 + BITARR16 + 16 + 136 + + + FSoE CRC_4 + UINT + 16 + 152 + + + FSoE Data 5 + BITARR16 + 16 + 168 + + + FSoE CRC_5 + UINT + 16 + 184 + + + FSoE ConnID + UINT + 16 + 200 + + + + ARRAY [0..4] OF BIT + 5 + BIT + + 0 + 5 + + + + ARRAY [0..0] OF BIT + 1 + BIT + + 0 + 1 + + + + INFODATA_FB_3 + 24 + + State + USINT + 8 + 0 + + + Diag + UINT + 16 + 8 + + + + INFODATA_3_0_0 + 16 + + State + USINT + 8 + 0 + + + Diag + USINT + 8 + 8 + + + + INFODATA_0_1_0 + 8 + + Input Safe Data Byte 0 + BYTE + 8 + 0 + + + + ARRAY [0..6] OF BIT + 7 + BIT + + 0 + 7 + + + + ARRAY [0..5] OF BIT + 6 + BIT + + 0 + 6 + + + + ARRAY [0..1] OF BYTE + 16 + BYTE + + 0 + 2 + + + + + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ff808080808080808080808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff0000c00000c0ffffffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ffff00ffff00ff000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff00ffff00ff007fff007fff000000000000000000000000000000000000000000000000000000000000000000000000ff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000120b0000120b00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff0000ff0000ff0000ff0000ff0000ff0000ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ff000000000000ff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff000000ff00ffff00ff000000ff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ff000000000000ff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a002000000000000000000000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff008066008099008066008099008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffffff000000ffffff0000008099ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ff00ffff00ffff00ffff00ffff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00000000ffff000000008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff0000ff00ffff0000ff008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00000000ffff000000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff99006666009999006666009999006666009900ffff00800000ffff008000008066ff00ffff00ffff00ffff00ffff00ff66009999006666009999006666009999006600ffff00ffff00ffff00ffff008099ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff00ff0000ff0000ff0000ff0000ff0000ff00c0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c000ffffc0c0c000ffff808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0ff0000c0c0c0ff0000808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c00000ffc0c0c00000ff808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0000000c0c0c0000000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0008000c0c0c0008000808080ff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0c0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ff + 424dd6020000000000003600000028000000100000000e0000000100180000000000a0020000c40e0000c40e00000000000000000000ff00ffff00ffff00ffff00ffff00ffff00ff808080808080808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffff00ffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff007fff007fff007fff007fff007fff007fffc0c0c0c0c0c0808080ff00ffff00ffff00ffff00ffff00ffff00ffff00ff + + + + + + + + + + + 2ms + + + 10ms + + + 200ms + + + FileWriterTask + + + PlcTask + + + + + + + SmallProject Instance + {08500001-0000-0000-F000-000000000064} + + + 0 + PlcTask + + #x02010070 + + 20 + 10000000 + + + + + + + + + + + Device 1 (EtherCAT) + + +
-801112064
+ 131072 + 8192 + 0 + 3 + 0 + 5612 + 20480 + +
0
+ 4096 + 12288 + 2 + 0 + 1 +
+ 128 + 1024 + 32 + 768 + 64 + 512 + 16 + 640 + + -1350027980 + 1 + 256 + +
+
+ + Image + + + TermEtherCAT (EK1200) + 1000 + + + TermPower1 (EL9222-5500) + 1001 + + 001080002600010001000000400080008000001026010000 + 801080002200010002000000400080008000801022010000 + 001104002400010003000000000000000400001124010000 + 801108002000010004000000000000000800801120010000 + 0000000000000000001100020100000001000000000000000000000000000000 + 0000000000000000801100010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + Term 12 (EL9222-5500) + 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 + 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + + + + + + TermOutput (EL2008) + 1002 + + 000f01004400010003000000000000000000000f44090000 + 0000000000000000000f00020100000001000000000000000000000000000000 + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + BIT + + + + + + TermSensorGnrl (EL6224) + 1003 + + + + GenericV + + Lift + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x5532a948 + + + + SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml + SICK AG + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png + AHM36B-BAQC012x12 + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png + Encoders + Absolute Encoder Multiturn + 0x00000720 + 0x00000020 + 008001D60000001A000011012087000000000000 + + Direct Parameters 1 + V_DirectParameters_1 + 0x0 + 16 + + Reserved + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Master Cycle Time + 0x2 + UINT8 + 8 + 112 + 32 + + rw + + + + Min Cycle Time + 0x3 + UINT8 + 8 + 104 + 32 + + rw + + + + M-Sequence Capability + 0x4 + UINT8 + 8 + 96 + 41 + + rw + + + + IO-Link Version ID + 0x5 + UINT8 + 8 + 88 + 17 + + rw + + + + Process Data Input Length + 0x6 + UINT8 + 8 + 80 + 135 + + rw + + + + Process Data Output Length + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Vendor ID 1 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Vendor ID 2 + 0x9 + UINT8 + 8 + 56 + 26 + + rw + + + + Device ID 1 + 0xa + UINT8 + 8 + 48 + 128 + + rw + + + + Device ID 2 + 0xb + UINT8 + 8 + 40 + 1 + + rw + + + + Device ID 3 + 0xc + UINT8 + 8 + 32 + 214 + + rw + + + + Reserved + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Reserved + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Reserved + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + System Command + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Direct Parameters 2 + V_DirectParameters_2 + 0x1 + 16 + + Device Specific Parameter 1 + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Device Specific Parameter 2 + 0x2 + UINT8 + 8 + 112 + 0 + + rw + + + + Device Specific Parameter 3 + 0x3 + UINT8 + 8 + 104 + 0 + + rw + + + + Device Specific Parameter 4 + 0x4 + UINT8 + 8 + 96 + 0 + + rw + + + + Device Specific Parameter 5 + 0x5 + UINT8 + 8 + 88 + 0 + + rw + + + + Device Specific Parameter 6 + 0x6 + UINT8 + 8 + 80 + 0 + + rw + + + + Device Specific Parameter 7 + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Device Specific Parameter 8 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Device Specific Parameter 9 + 0x9 + UINT8 + 8 + 56 + 0 + + rw + + + + Device Specific Parameter 10 + 0xa + UINT8 + 8 + 48 + 0 + + rw + + + + Device Specific Parameter 11 + 0xb + UINT8 + 8 + 40 + 0 + + rw + + + + Device Specific Parameter 12 + 0xc + UINT8 + 8 + 32 + 0 + + rw + + + + Device Specific Parameter 13 + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Device Specific Parameter 14 + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Device Specific Parameter 15 + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + Device Specific Parameter 16 + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + + + Standard Command + V_SystemCommand + 0x2 + 1 + + Standard Command + 0x0 + UINT8 + 8 + 0 + 0 + + wo + + + 0x82 + Restore Factory Settings + + + 0x80 + Device Reset + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Device Access Locks + V_DeviceAccessLocks + 0xc + 2 + + Parameter (write) Access Lock + 0x1 + BOOL + 1 + 0 + + + rw s + + + + Data Storage Lock + 0x2 + BOOL + 1 + 1 + + + rw s + + + + Local Parameterization Lock + 0x3 + BOOL + 1 + 2 + + + rw s + + + + Local User Interface Lock + 0x4 + BOOL + 1 + 3 + + + rw s + + + + + Vendor Name + V_VendorName + 0x10 + 64 + + Vendor Name + 0x0 + String + 512 + 0 + SICK AG + SICK AG + ro + + + + + Vendor Text + V_VendorText + 0x11 + 64 + + Vendor Text + 0x0 + String + 512 + 0 + SICK Sensor Intelligence. + SICK Sensor Intelligence. + ro + + + + + Product Name + V_ProductName + 0x12 + 64 + + Product Name + 0x0 + String + 512 + 0 + AHM36B-BDQC012X12 + + ro + + + + + Product ID + V_ProductID + 0x13 + 64 + + Product ID + 0x0 + String + 512 + 0 + 1092007 + + ro + + + + + Product Text + V_ProductText + 0x14 + 64 + + Product Text + 0x0 + String + 512 + 0 + Absolute Encoder Multiturn + Absolute Encoder Multiturn + ro + + + + + Serial Number + V_SerialNumber + 0x15 + 16 + + Serial Number + 0x0 + String + 128 + 0 + 20230078 + + ro + + + + + Hardware Version + V_HardwareRevision + 0x16 + 64 + + Hardware Version + 0x0 + String + 512 + 0 + 1.0 + 1.0 + ro + + + + + Firmware Version + V_FirmwareRevision + 0x17 + 64 + + Firmware Version + 0x0 + String + 512 + 0 + 1.1.0.1746R + + ro + + + + + Application Specific Tag + V_ApplicationSpecificTag + 0x18 + 32 + + Application Specific Tag + 0x0 + String + 256 + 0 + *** + *** + rw + + + + + Device Status + V_DeviceStatus + 0x24 + 1 + + Device Status + 0x0 + UINT8 + 8 + 0 + 0 + + ro + + + 5 + 255 + Reserved + + + + + PositionVelocity + V_ProcessDataInput + 0x28 + 8 + + Position + 0x1 + UINT32 + 32 + 0 + + + ro s + + + + Velocity + 0x2 + INT32 + 32 + 32 + + + ro s + + + + + Profile Characteristic + V_ProfileIdentifier + 0xd + 8 + + Profile Characteristic + 0x1 + UINT16 + 16 + 48 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x2 + UINT16 + 16 + 32 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x3 + UINT16 + 16 + 16 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x4 + UINT16 + 16 + 0 + + + ro + see IO-Link Interface Specification + + + + PDInputDescriptor + V_PDInputDescriptor + 0xe + 6 + + Position + 0x1 + OctetString + 24 + 24 + + + ro s + see IO-Link Interface Specification + + + Velocity + 0x2 + OctetString + 24 + 0 + + + ro s + see IO-Link Interface Specification + + + + Device Specific Tag + V_DeviceSpecificTag + 0x40 + 16 + + Device Specific Tag + 0x0 + String + 128 + 0 + *** + *** + rw + see IO-Link Interface Specification + + + + Velocity Value + V_VelocityValue + 0x41 + 4 + + Velocity Value + 0x0 + INT32 + 32 + 0 + 0 + + ro + see IO-Link Interface Specification + + + + Velocity Format + V_VelocityFormat + 0x42 + 1 + + Velocity Format + 0x0 + UINT8 + 8 + 0 + 3 + 3 + rw + The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. + + 0x0 + Counts per second [cps] + + + 0x1 + Counts per 100ms [cp100ms] + + + 0x2 + Counts per 10ms [cp10ms] + + + 0x3 + Rounds per minute [rpm] + + + 0x4 + Rounds per second [rps] + + + + + Velocity Update Time + V_VelocityUpdateTime + 0x43 + 4 + + Velocity Update Time + 0x0 + UINT32 + 32 + 0 + 2 + 2 + rw + The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. + + 1 + 50 + Velocity update time range. + + + + + Velocity Integration Time + V_VelocityIntegrationTime + 0x44 + 4 + + Velocity Integration Time + 0x0 + UINT32 + 32 + 0 + 200 + 200 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 200 + Velocity integration time range. + + + + + Counts per Revolution + V_CountsPerRevolution + 0x51 + 4 + + Counts per Revolution + 0x0 + UINT32 + 32 + 0 + 4096 + 4096 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 4096 + Value range for counts per revolution. + + + + + Total Measuring Range + V_TotalMeasuringRange + 0x52 + 4 + + Total Measuring Range + 0x0 + UINT32 + 32 + 0 + 16777216 + 16777216 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 16777216 + Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. + + + + + Preset Value + V_PresetValue + 0x53 + 4 + + Preset Value + 0x0 + UINT32 + 32 + 0 + 100100 + + wo + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 0 + 16777215 + Preset Value range. + + + + + Position Value + V_PositionValue + 0x54 + 4 + + Position Value + 0x0 + UINT32 + 32 + 0 + 100100 + + ro + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + + + Counting Direction + V_CountingDirection + 0x55 + 1 + + Counting Direction + 0x0 + UINT8 + 8 + 0 + 0 + + rw + The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. + + 0x0 + Clockwise (cw) + + + 0x1 + Counter-clockwise (ccw) + + + + + RawPosition + V_RawPosition + 0x56 + 4 + + RawPosition + 0x0 + UINT32 + 32 + 0 + 2205371 + 0 + ro + Raw position, with no offset or scaling modification. + + + + Total Measuring Range adjusted + V_TotalMeasuringRangeAdjusted + 0x5b + 4 + + Total Measuring Range adjusted + 0x0 + UINT32 + 32 + 0 + 16777216 + + ro + Raw position, with no offset or scaling modification. + + + + Status Flag A + V_StatusFlagA + 0x5c + 2 + + Status Flag A + 0x0 + UINT16 + 16 + 0 + 0 + + ro + Raw position, with no offset or scaling modification. + + + + SICK Profile Version + V_SICK_ProfileVersion + 0xcd + 4 + + SICK Profile Version + 0x0 + String + 32 + 0 + 1.00 + 1.00 + ro + Raw position, with no offset or scaling modification. + + + + 0x1800 + 0x0 + DS_DumyEvent + Event for Data Storage + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + 0x0 + + + + 0 + 0 + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + + + + SICK-AHM36_IO-Link_Basic-20180313-IODD1.1.xml + SICK AG + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-logo.png + AHM36B-BAQC012x12 + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_48-icon.png + C:\TwinCAT\3.1\Config\Io\IOLink\SICK-AHx36_160-pic.png + Encoders + Absolute Encoder Multiturn + 0x00000720 + 0x00000020 + 008001D60000001A000011012087000000000000 + + Direct Parameters 1 + V_DirectParameters_1 + 0x0 + 16 + + Reserved + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Master Cycle Time + 0x2 + UINT8 + 8 + 112 + 32 + + rw + + + + Min Cycle Time + 0x3 + UINT8 + 8 + 104 + 32 + + rw + + + + M-Sequence Capability + 0x4 + UINT8 + 8 + 96 + 41 + + rw + + + + IO-Link Version ID + 0x5 + UINT8 + 8 + 88 + 17 + + rw + + + + Process Data Input Length + 0x6 + UINT8 + 8 + 80 + 135 + + rw + + + + Process Data Output Length + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Vendor ID 1 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Vendor ID 2 + 0x9 + UINT8 + 8 + 56 + 26 + + rw + + + + Device ID 1 + 0xa + UINT8 + 8 + 48 + 128 + + rw + + + + Device ID 2 + 0xb + UINT8 + 8 + 40 + 1 + + rw + + + + Device ID 3 + 0xc + UINT8 + 8 + 32 + 214 + + rw + + + + Reserved + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Reserved + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Reserved + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + System Command + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Direct Parameters 2 + V_DirectParameters_2 + 0x1 + 16 + + Device Specific Parameter 1 + 0x1 + UINT8 + 8 + 120 + 0 + + rw + + + + Device Specific Parameter 2 + 0x2 + UINT8 + 8 + 112 + 0 + + rw + + + + Device Specific Parameter 3 + 0x3 + UINT8 + 8 + 104 + 0 + + rw + + + + Device Specific Parameter 4 + 0x4 + UINT8 + 8 + 96 + 0 + + rw + + + + Device Specific Parameter 5 + 0x5 + UINT8 + 8 + 88 + 0 + + rw + + + + Device Specific Parameter 6 + 0x6 + UINT8 + 8 + 80 + 0 + + rw + + + + Device Specific Parameter 7 + 0x7 + UINT8 + 8 + 72 + 0 + + rw + + + + Device Specific Parameter 8 + 0x8 + UINT8 + 8 + 64 + 0 + + rw + + + + Device Specific Parameter 9 + 0x9 + UINT8 + 8 + 56 + 0 + + rw + + + + Device Specific Parameter 10 + 0xa + UINT8 + 8 + 48 + 0 + + rw + + + + Device Specific Parameter 11 + 0xb + UINT8 + 8 + 40 + 0 + + rw + + + + Device Specific Parameter 12 + 0xc + UINT8 + 8 + 32 + 0 + + rw + + + + Device Specific Parameter 13 + 0xd + UINT8 + 8 + 24 + 0 + + rw + + + + Device Specific Parameter 14 + 0xe + UINT8 + 8 + 16 + 0 + + rw + + + + Device Specific Parameter 15 + 0xf + UINT8 + 8 + 8 + 0 + + rw + + + + Device Specific Parameter 16 + 0x10 + UINT8 + 8 + 0 + 0 + + rw + + + + + Standard Command + V_SystemCommand + 0x2 + 1 + + Standard Command + 0x0 + UINT8 + 8 + 0 + 0 + + wo + + + 0x82 + Restore Factory Settings + + + 0x80 + Device Reset + + + 0 + 63 + Reserved + + + 131 + 159 + Reserved + + + + + Device Access Locks + V_DeviceAccessLocks + 0xc + 2 + + Parameter (write) Access Lock + 0x1 + BOOL + 1 + 0 + + + rw s + + + + Data Storage Lock + 0x2 + BOOL + 1 + 1 + + + rw s + + + + Local Parameterization Lock + 0x3 + BOOL + 1 + 2 + + + rw s + + + + Local User Interface Lock + 0x4 + BOOL + 1 + 3 + + + rw s + + + + + Vendor Name + V_VendorName + 0x10 + 64 + + Vendor Name + 0x0 + String + 512 + 0 + SICK AG + SICK AG + ro + + + + + Vendor Text + V_VendorText + 0x11 + 64 + + Vendor Text + 0x0 + String + 512 + 0 + SICK Sensor Intelligence. + SICK Sensor Intelligence. + ro + + + + + Product Name + V_ProductName + 0x12 + 64 + + Product Name + 0x0 + String + 512 + 0 + AHM36B-BDQC012X12 + + ro + + + + + Product ID + V_ProductID + 0x13 + 64 + + Product ID + 0x0 + String + 512 + 0 + 1092007 + + ro + + + + + Product Text + V_ProductText + 0x14 + 64 + + Product Text + 0x0 + String + 512 + 0 + Absolute Encoder Multiturn + Absolute Encoder Multiturn + ro + + + + + Serial Number + V_SerialNumber + 0x15 + 16 + + Serial Number + 0x0 + String + 128 + 0 + 20230115 + + ro + + + + + Hardware Version + V_HardwareRevision + 0x16 + 64 + + Hardware Version + 0x0 + String + 512 + 0 + 1.0 + 1.0 + ro + + + + + Firmware Version + V_FirmwareRevision + 0x17 + 64 + + Firmware Version + 0x0 + String + 512 + 0 + 1.1.0.1746R + + ro + + + + + Application Specific Tag + V_ApplicationSpecificTag + 0x18 + 32 + + Application Specific Tag + 0x0 + String + 256 + 0 + *** + *** + rw + + + + + Device Status + V_DeviceStatus + 0x24 + 1 + + Device Status + 0x0 + UINT8 + 8 + 0 + 0 + + ro + + + 5 + 255 + Reserved + + + + + PositionVelocity + V_ProcessDataInput + 0x28 + 8 + + Position + 0x1 + UINT32 + 32 + 0 + + + ro s + + + + Velocity + 0x2 + INT32 + 32 + 32 + + + ro s + + + + + Profile Characteristic + V_ProfileIdentifier + 0xd + 8 + + Profile Characteristic + 0x1 + UINT16 + 16 + 48 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x2 + UINT16 + 16 + 32 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x3 + UINT16 + 16 + 16 + + + ro + see IO-Link Interface Specification + + + Profile Characteristic + 0x4 + UINT16 + 16 + 0 + + + ro + see IO-Link Interface Specification + + + + PDInputDescriptor + V_PDInputDescriptor + 0xe + 6 + + Position + 0x1 + OctetString + 24 + 24 + + + ro s + see IO-Link Interface Specification + + + Velocity + 0x2 + OctetString + 24 + 0 + + + ro s + see IO-Link Interface Specification + + + + Device Specific Tag + V_DeviceSpecificTag + 0x40 + 16 + + Device Specific Tag + 0x0 + String + 128 + 0 + *** + *** + rw + see IO-Link Interface Specification + + + + Velocity Value + V_VelocityValue + 0x41 + 4 + + Velocity Value + 0x0 + INT32 + 32 + 0 + 0 + + ro + see IO-Link Interface Specification + + + + Velocity Format + V_VelocityFormat + 0x42 + 1 + + Velocity Format + 0x0 + UINT8 + 8 + 0 + 3 + 3 + rw + The format of the velocity can be choosen between cps, cp100ms, cp10ms, rpm and rps. + + 0x0 + Counts per second [cps] + + + 0x1 + Counts per 100ms [cp100ms] + + + 0x2 + Counts per 10ms [cp10ms] + + + 0x3 + Rounds per minute [rpm] + + + 0x4 + Rounds per second [rps] + + + + + Velocity Update Time + V_VelocityUpdateTime + 0x43 + 4 + + Velocity Update Time + 0x0 + UINT32 + 32 + 0 + 2 + 2 + rw + The speed is calculated from the average of several measurements. The update time T1 defines the time between the individual measurements. + + 1 + 50 + Velocity update time range. + + + + + Velocity Integration Time + V_VelocityIntegrationTime + 0x44 + 4 + + Velocity Integration Time + 0x0 + UINT32 + 32 + 0 + 200 + 200 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 200 + Velocity integration time range. + + + + + Counts per Revolution + V_CountsPerRevolution + 0x51 + 4 + + Counts per Revolution + 0x0 + UINT32 + 32 + 0 + 4096 + 4096 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 4096 + Value range for counts per revolution. + + + + + Total Measuring Range + V_TotalMeasuringRange + 0x52 + 4 + + Total Measuring Range + 0x0 + UINT32 + 32 + 0 + 16777216 + 16777216 + rw + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 1 + 16777216 + Value range for total measuring range. The total measuring range must be 2^n times the counts per revolution. + + + + + Preset Value + V_PresetValue + 0x53 + 4 + + Preset Value + 0x0 + UINT32 + 32 + 0 + 0 + + wo + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + 0 + 16777215 + Preset Value range. + + + + + Position Value + V_PositionValue + 0x54 + 4 + + Position Value + 0x0 + UINT32 + 32 + 0 + 16777047 + + ro + The speed is calculated from the average of several measurements. The integration time T2 defines the number of values from which the average is calculated. + + + + Counting Direction + V_CountingDirection + 0x55 + 1 + + Counting Direction + 0x0 + UINT8 + 8 + 0 + 0 + + rw + The code sequence defines which direction of rotation increases the position value. The direction of rotation is defined looking at the shaft. + + 0x0 + Clockwise (cw) + + + 0x1 + Counter-clockwise (ccw) + + + + + RawPosition + V_RawPosition + 0x56 + 4 + + RawPosition + 0x0 + UINT32 + 32 + 0 + 2519491 + 0 + ro + Raw position, with no offset or scaling modification. + + + + Total Measuring Range adjusted + V_TotalMeasuringRangeAdjusted + 0x5b + 4 + + Total Measuring Range adjusted + 0x0 + UINT32 + 32 + 0 + 16777216 + + ro + Raw position, with no offset or scaling modification. + + + + Status Flag A + V_StatusFlagA + 0x5c + 2 + + Status Flag A + 0x0 + UINT16 + 16 + 0 + 0 + + ro + Raw position, with no offset or scaling modification. + + + + SICK Profile Version + V_SICK_ProfileVersion + 0xcd + 4 + + SICK Profile Version + 0x0 + String + 32 + 0 + 1.00 + 1.00 + ro + Raw position, with no offset or scaling modification. + + + + 0x1800 + 0x0 + DS_DumyEvent + Event for Data Storage + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + ME_IdentificationMenu + Identification Menu + + 0x0 + 0x0 + + V_VendorName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductName + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductID + 0 + 0.000000 + 0.000000 + + + + + + + V_ProductText + 0 + 0.000000 + 0.000000 + + ro + + + + + V_SerialNumber + 0 + 0.000000 + 0.000000 + + + + + + + V_HardwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_FirmwareRevision + 0 + 0.000000 + 0.000000 + + ro + + + + + V_ApplicationSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + V_DeviceSpecificTag + 0 + 0.000000 + 0.000000 + + + + + + + + ME_ParameterMenu + Parameter Menu + + 0x0 + 0x0 + + V_CountsPerRevolution + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRange + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_TotalMeasuringRangeAdjusted + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_PresetValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_RawPosition + 0 + 0.000000 + 0.000000 + + ro + Hex + + + + V_CountingDirection + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityFormat + 0 + 0.000000 + 0.000000 + + + + + + + V_VelocityUpdateTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_VelocityIntegrationTime + 0 + 0.000000 + 0.000000 + ms + + + + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 128 + + + V_SystemCommand + 0 + 0.000000 + 0.000000 + + wo + Button + 130 + + + + ME_ObservationMenu + Observation Menu + + 0x0 + 0x0 + + V_PositionValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + V_VelocityValue + 0 + 0.000000 + 0.000000 + + + Dec + + + + ME_DirectParameters + Direct Parameters + + 0x0 + 0x0 + + V_DirectParameters_1 + 0 + 0.000000 + 0.000000 + + + + + + + V_DirectParameters_2 + 0 + 0.000000 + 0.000000 + + + + + + + + + ME_DiagnosisMenu + Diagnosis Menu + + 0x0 + 0x0 + + V_DeviceStatus + 0 + 0.000000 + 0.000000 + + + + + + + V_StatusFlagA + 0 + 0.000000 + 0.000000 + + + + + + + + + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + 0x0 + + + + 0 + 0 + + Position + 0x20 + 0x0 + UINT32 + + + Velocity + 0x20 + 0x20 + INT32 + + + + + + + GenericP + + GenericV + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001710000000000000 + + + + + + + 0x5532a0f0 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 00131c002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b00000000000000000000000000000000000000000000003010800114000000d60180001a0000001101200087000000000003004f626a656374203830313000 + 020003001c0000000b00000000000000000000000000000000000000000000003020800114000000d60180001a0000001101200087000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + DINT + + + UDINT + + + + + DINT + + + UDINT + + + + + UINT + + + + + + + + + + TermPower2 (EL9222-5500) + 1001 + + 001080002600010001000000400080008000001026010000 + 801080002200010002000000400080008000801022010000 + 001104002400010003000000000000000400001124010000 + 801108002000010004000000000000000800801120010000 + 0000000000000000001100020100000001000000000000000000000000000000 + 0000000000000000801100010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + Term 15 (EL9222-5500) + 004003000a00000000000000030010000000000000000000000000000000000020f3100502000000010000 + 02000300090000000f00000003000000000000000000000000000000000000002000801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002000801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + 02000300090000000f00000003000000000000000000000000000000000000002010801101000000054e6f6d696e616c2043757272656e7400 + 02000300090000001a00000003000000000000000000000000000000000000002010801901000000005377697463682050726f6772616d6d696e6720436f6e74726f6c00 + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + BIT + + + BIT + + + BIT2 + + + ARRAY [0..1] OF BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..10] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..13] OF BIT + + + + + + + + + + TermSensorFront (EL6224) + 1003 + + + + GenericV + + ObjFrL + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001783000000000000 + + + + + + + 0x28040aa8 + + + + + GenericV + + ObjFrR + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x1146eb68 + + + + + GenericV + + VertFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x1146eb68 + + + + + GenericV + + HorizFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x1146eb68 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 001316002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + + + + + + TermSensorBack (EL6224) + 1003 + + + + GenericV + + ObjBkL + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + GenericV + + ObjBkR + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + GenericV + + VertBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + GenericV + + HorizBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d57660 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 001316002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + + + + + + TermSensorEndstop (EL6224) + 1003 + + + + GenericV + + EndStopLFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + GenericV + + EndStopLBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + GenericV + + EndStopMFr + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + GenericV + + EndStopMBk + + + + + 0x00000717 + 0x77a24540 + 0000000000000000000010001783000000000000 + + + + + + + 0x69d59a88 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 001316002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170083000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170083000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170083000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170083000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + UDINT + + + + + + + + + + Pr + 1003 + + + + GenericV + + PrLnFr + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eba00 + + + + + GenericV + + PrLnBk + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eac18 + + + + + GenericV + + PrMnFr + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eac18 + + + + + GenericV + + PrMnBk + + + + + + 0x00000717 + 0x00000100 + 0000000000000000000010001710000000000000 + + + + + + + 0x460eac18 + + + + + 001000012600010001000000400000010001001026010000 + 001100012200010002000000400000010001001122010000 + 001200002400000003000000000000000000001224000000 + 00130e002000010004000000000000000600001320010000 + 0000000000000000000000020000000001000000000000000000000000000000 + 0000000000000000001300010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 4672656552756e0000000000000000004672656552756e00000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000 + 4443000000000000000000000000000044432d53796e6368726f6e000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000 + 020003001c0000000b0000000000000000000000000000000000000000000000300080011400000000000000000000001000170010000000000003004f626a656374203830303000 + 020003001c0000000b0000000000000000000000000000000000000000000000301080011400000000000000000000001000170010000000000003004f626a656374203830313000 + 020003001c0000000b0000000000000000000000000000000000000000000000302080011400000000000000000000001000170010000000000003004f626a656374203830323000 + 020003001c0000000b0000000000000000000000000000000000000000000000303080011400000000000000000000001000170010000000000003004f626a656374203830333000 + + + ARRAY [0..0] OF BYTE + + + ARRAY [0..3] OF BIT + + + BIT + + + ARRAY [0..1] OF BIT + + + BIT + + + + + USINT + + + + USINT + + + + USINT + + + + USINT + + + + + + UINT + + + + + UINT + + + + + UINT + + + + + UINT + + + + + + + + + + TermSafety (EL2911) + 1004 + + 001000012600010001000000000100010001001026010000 + 001100012200010002000000000100010001001122010000 + 001234002400010003000000000000000700001224010000 + 001d23002000010004000000000000000900001d20010000 + 002e00002400000003000000000000000000002e24000000 + 002f00002000000004000000000000000000002f20000000 + fa2f01002400010003000000000000000200fa2f24010000 + 0000000000000000001200020100000001000000060000000200000000000000 + 0000000000000000001d00010100000002000000060000000300000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0000000000000000000000020000000001000000060000000400010000000000 + 0000000000000000000000010000000002000000060000000500010000000000 + 0000000000000000fa2f00020100000001000000060000000600020000000000 + 0010f400f410f400 + + + + + #x00000000 + #x00000000 + #x00000000 + #x00000000 + 004003000a00000000000000000000000000000000000000000000000000000020f3100502000000010000 + + + FSOE_11 + + + + + FSOE_27 + + + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..4] OF BIT + + + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..0] OF BIT + + + DINT + + + DINT + + + DINT + + + DINT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + BIT + + + ARRAY [0..2] OF BIT + + + UINT + + + UINT + + + + + INFODATA_FB_3 + + + + + INFODATA_3_0_0 + + + + + WORD + + + UDINT + + + INFODATA_0_1_0 + + + + + BIT + + + ARRAY [0..6] OF BIT + + + + + BIT + + + BIT + + + ARRAY [0..5] OF BIT + + + + + USINT + + + USINT + + + + + ARRAY [0..1] OF BYTE + + + + + + + 0000000001000400000000000000000000000000000000000000000000000000 + 2911 + + + 0000010001000400000000000000000000000000000000000000000000000000 + 200 + + Module 2 (FSOUT) + 409 + 02000000c8000000000004000000000000000000000000000000000000000000 + 6142 + + + + 0000010001000400000000000000000000000000000000000000000000000000 + 1950 + + Module 3 (DEVICEIO) + 409 + 020000009e070000000004000000000000000000000000000000000000000000 + 7166 + + + + 0000010001000400000000000000000000000000000000000000000000000000 + 691 + + Module 4 (FSLOGIC) + 409 + 02000000b3020000000004000000000000000000000000000000000000000000 + 7167 + 6143 + + + + + + + Term 31 (EL3062) + 1005 + + 001080002600010001000000800080008000001026010000 + 801080002200010002000000800080008000801022010000 + 001100000400000003000000000000000000001104000000 + 801108002000010004000000000000000800801120010000 + 0000000000000000801100010100000002000000000000000000000000000000 + 00000000000000000d0800010100000003000000000000000000000000000000 + 0010f400f410f400 + 030000000c00000002000000f103000000000000000000000000000000000000 + + #x1a01 + + BIT + + + + BIT + + + + BIT2 + + + + BIT2 + + + + BIT + + + + ARRAY [0..0] OF BIT + + + ARRAY [0..5] OF BIT + + + BIT + + + + BIT + + + + INT + + + + #x1a00 + + INT + + + + #x1a03 + + BIT + + + + BIT + + + + BIT2 + + + + BIT2 + + + + BIT + + + + ARRAY [0..0] OF BIT + + + ARRAY [0..5] OF BIT + + + BIT + + + + BIT + + + + INT + + + + #x1a02 + + INT + + + + + + + + Term 32 (EL9505) + 1006 + + 001001000000010004000000000000000000001000000000 + 0000000000000000001000010100000002000000000000000000000000000000 + + + BIT + + + BIT + + + + + + Term 18 (EL9011) + 1007 + + + + + +
+ + CanopenMaster + + +
-801112064
+ 65536 + 8192 + 0 + 3 + 0 + 5612 + 20480 +
+
+ + Image + + + DriveLnMn_15 + 41 + + Inputs + + NodeState + + USINT + 61560 + + + DiagFlag + + BIT + 64911 + + + EmergencyCounter + + USINT + 62584 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + StatusWord + UINT + + + + Status + + ReceiveCounter + UINT + 65536 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 64 + + + ActualVelocity + INT + 96 + 4 + + + + Status + + ReceiveCounter + UINT + 65552 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 128 + + + ErrorRegister4001 + INT + 136 + 1 + + + TempPowerAmp + INT + 152 + 3 + + + I2TRate + USINT + 168 + 5 + + + + Status + + ReceiveCounter + UINT + 65568 + + + + + TxPDO 4 + 82 + + Inputs + + CurrentFiltered + DINT + 192 + + + Voltage + UDINT + 224 + 4 + + + + Status + + ReceiveCounter + UINT + 65584 + + + + + RxPDO 1 + 42 + + Outputs + + ControlWord + UINT + + + + Control + + SendCounter + UINT + 65536 + + + + + RxPDO 2 + 42 + + Outputs + + ProfilePos_TargetPos + DINT + 64 + + + ProfilePos_Deceleration + UDINT + 96 + + + + Control + + SendCounter + UINT + 65552 + + + + + RxPDO 3 + 42 + + Outputs + + ProfilePos_TargetVel + UDINT + 128 + + + ProfilePos_Acceleration + UDINT + 160 + + + + Control + + SendCounter + UINT + 65568 + + + + + RxPDO 4 + 42 + + Outputs + + ProfileVel_TargetVelocity + DINT + 192 + + + ModeOfOperation + SINT + 224 + + + + Control + + SendCounter + UINT + 65584 + + + + + + + Lift_18_Brake + 41 + + Inputs + + NodeState + + USINT + 61584 + + + DiagFlag + + BIT + 64914 + + + EmergencyCounter + + USINT + 62608 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + Statusword + UINT + 256 + + + + Status + + ReceiveCounter + UINT + 65600 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 320 + + + ActualVelocity + INT + 352 + + + + Status + + ReceiveCounter + UINT + 65616 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 384 + + + ErrorRegister_3001 + INT + 392 + + + TempPowerAmp + INT + 408 + 3 + + + I2TRate + USINT + 424 + 5 + + + + Status + + ReceiveCounter + UINT + 65632 + + + + + TxPDO 4 + 82 + + Inputs + + Actual_Voltage + UDINT + 448 + + + Actual_Current_Filtered + DINT + 480 + + + + Status + + ReceiveCounter + UINT + 65648 + + + + + RxPDO 1 + 42 + + Outputs + + Controlword + UINT + 256 + + + + Control + + SendCounter + UINT + 65600 + + + + + RxPDO 2 + 42 + + Outputs + + ModeOfOperation + SINT + 320 + + + Profile_Deceleration + UDINT + 328 + 1 + + + + Control + + SendCounter + UINT + 65616 + + + + + RxPDO 3 + 42 + + Outputs + + TargetVelocity_VelocityProfile + DINT + 384 + + + Profile_Acceleration + UDINT + 416 + + + + Control + + SendCounter + UINT + 65632 + + + + + RxPDO 4 + 42 + + Outputs + + TargetPosition + DINT + 448 + + + TargetVelocityProfilePosition + UDINT + 480 + + + + Control + + SendCounter + UINT + 65648 + + + + + + + DriveMain_17 + 41 + + Inputs + + NodeState + + USINT + 61576 + + + DiagFlag + + BIT + 64913 + + + EmergencyCounter + + USINT + 62600 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + StatusWord + UINT + 512 + + + + Status + + ReceiveCounter + UINT + 65664 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 576 + + + ActualVelocity + INT + 608 + + + + Status + + ReceiveCounter + UINT + 65680 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 640 + + + ErrorRegister4001 + INT + 648 + 1 + + + TempPowerAmp + INT + 664 + 3 + + + I2TRate + USINT + 680 + 5 + + + + Status + + ReceiveCounter + UINT + 65696 + + + + + TxPDO 4 + 82 + + Inputs + + CurrentFiltered + DINT + 704 + + + Voltage + UDINT + 736 + 4 + + + + Status + + ReceiveCounter + UINT + 65712 + + + + + RxPDO 1 + 42 + + Outputs + + ControlWord + UINT + 512 + + + + Control + + SendCounter + UINT + 65664 + + + + + RxPDO 2 + 42 + + Outputs + + ProfilePos_TargetPos + DINT + 576 + + + ProfilePos_Deceleration + UDINT + 608 + + + + Control + + SendCounter + UINT + 65680 + + + + + RxPDO 3 + 42 + + Outputs + + ProfilePos_TargetVel + UDINT + 640 + + + ProfilePos_Acceleration + UDINT + 672 + + + + Control + + SendCounter + UINT + 65696 + + + + + RxPDO 4 + 42 + + Outputs + + ModeOfOperation + SINT + 704 + + + ProfileVel_TargetVelocity + DINT + 712 + + + + Control + + SendCounter + UINT + 65712 + + + + + + + DriveLane_16 + 41 + + Inputs + + NodeState + + USINT + 61568 + + + DiagFlag + + BIT + 64912 + + + EmergencyCounter + + USINT + 62592 + + + + Outputs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + StatusWord + UINT + 768 + + + + Status + + ReceiveCounter + UINT + 65728 + + + + + TxPDO 2 + 82 + + Inputs + + ActualPosition + DINT + 832 + + + ActualVelocity + INT + 864 + + + + Status + + ReceiveCounter + UINT + 65744 + + + + + TxPDO 3 + 82 + + Inputs + + ModeOfOperation + SINT + 896 + + + ErrorRegister4001 + INT + 904 + 1 + + + TempPowerAmp + INT + 920 + 3 + + + I2TRate + USINT + 936 + 5 + + + + Status + + ReceiveCounter + UINT + 65760 + + + + + TxPDO 4 + 82 + + Inputs + + CurrentFiltered + DINT + 960 + + + Voltage + UDINT + 992 + 4 + + + + Status + + ReceiveCounter + UINT + 65776 + + + + + RxPDO 1 + 42 + + Outputs + + ControlWord + UINT + 768 + + + + Control + + SendCounter + UINT + 65728 + + + + + RxPDO 2 + 42 + + Outputs + + ProfilePos_TargetPos + DINT + 832 + + + ProfilePos_Deceleration + UDINT + 864 + + + + Control + + SendCounter + UINT + 65744 + + + + + RxPDO 3 + 42 + + Outputs + + ProfilePos_TargetVel + UDINT + 896 + + + ProfilePos_Acceleration + UDINT + 928 + + + + Control + + SendCounter + UINT + 65760 + + + + + RxPDO 4 + 42 + + Outputs + + ProfileVel_TargetVelocity + DINT + 960 + + + ModeOfOperation + SINT + 992 + + + + Control + + SendCounter + UINT + 65776 + + + + + + + Bms_32 + 41 + + Inputs + + NodeState + + USINT + 61696 + + + DiagFlag + + BIT + 64928 + + + EmergencyCounter + + USINT + 62720 + + + + Outputs + + + + + + + + + + + + TxPDO 1 + 82 + + Inputs + + Pack_V_Sum + UINT + 1024 + + + Pack_I_Master + DINT + 1040 + 2 + + + BmsState + USINT + 1072 + 6 + + + + Status + + ReceiveCounter + UINT + 65792 + + + + + TxPDO 2 + 82 + + Inputs + + Cell_T_Min + SINT + 1088 + + + Cell_T_Max + SINT + 1096 + 1 + + + SOC + UINT + 1104 + 2 + + + Cell_V_Max + UINT + 1120 + 4 + + + Cell_V_Min + UINT + 1136 + 6 + + + + Status + + ReceiveCounter + UINT + 65808 + + + + + TxPDO 3 + 82 + + Inputs + + ConfigVersion + DINT + 1152 + + + + Status + + ReceiveCounter + UINT + 65824 + + + + + RxPDO 1 + 42 + + Outputs + + EnableCharge + BYTE + 1024 + + + EnableHeating + BYTE + 1032 + + + + Control + + SendCounter + UINT + 65792 + + + + + + + + + + + + + +
+
+
+
diff --git a/plc/example/example/smallproject/GVLs/GLOBAL.TcGVL b/plc/example/src/Globals/Global.TcGVL similarity index 88% rename from plc/example/example/smallproject/GVLs/GLOBAL.TcGVL rename to plc/example/src/Globals/Global.TcGVL index 7f94063..8080960 100644 --- a/plc/example/example/smallproject/GVLs/GLOBAL.TcGVL +++ b/plc/example/src/Globals/Global.TcGVL @@ -1,33 +1,33 @@ - - - - - + + + + + \ No newline at end of file diff --git a/plc/example/example/smallproject/POUs/MAIN.TcPOU b/plc/example/src/Programs/Main.TcPOU similarity index 89% rename from plc/example/example/smallproject/POUs/MAIN.TcPOU rename to plc/example/src/Programs/Main.TcPOU index 73ce9bd..35974df 100644 --- a/plc/example/example/smallproject/POUs/MAIN.TcPOU +++ b/plc/example/src/Programs/Main.TcPOU @@ -1,57 +1,57 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/example/example/smallproject/smallproject.plcproj b/plc/example/src/SmallProject.plcproj similarity index 93% rename from plc/example/example/smallproject/smallproject.plcproj rename to plc/example/src/SmallProject.plcproj index b4541f6..2911bc9 100644 --- a/plc/example/example/smallproject/smallproject.plcproj +++ b/plc/example/src/SmallProject.plcproj @@ -1,94 +1,96 @@ - - - - 1.0.0.0 - 2.0 - {84419b4d-a906-4a7e-b105-28b655a900f8} - True - true - true - false - smallproject - 3.1.4024.0 - {fb64cf40-248d-4842-835d-2d98102ff47d} - {bfde0c85-6d1d-4c28-95cb-9059e79287bd} - {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} - {60a29fff-f477-4dd6-bc68-20a3e3286849} - {f2821ad3-d81b-4c74-a01a-71474780814f} - {c34386ea-03e6-4409-9a3f-3bcbf5806004} - - - - Code - - - Code - true - - - Code - - - Code - - - - - - - - - - - Tc2_Standard, * (Beckhoff Automation GmbH) - Tc2_Standard - - - Tc2_System, * (Beckhoff Automation GmbH) - Tc2_System - - - Tc3_Module, * (Beckhoff Automation GmbH) - Tc3_Module - - - - - Content - - - - - - - - "<ProjectRoot>" - - {40450F57-0AA3-4216-96F3-5444ECB29763} - - "{40450F57-0AA3-4216-96F3-5444ECB29763}" - - - ActiveVisuProfile - IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= - - - {192FAD59-8248-4824-A8DE-9177C94C195A} - - "{192FAD59-8248-4824-A8DE-9177C94C195A}" - - - - - - - - - System.Collections.Hashtable - {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} - System.String - - - - + + + + 1.0.0.0 + 2.0 + {84419b4d-a906-4a7e-b105-28b655a900f8} + True + true + true + false + smallproject + 3.1.4024.0 + {fb64cf40-248d-4842-835d-2d98102ff47d} + {bfde0c85-6d1d-4c28-95cb-9059e79287bd} + {62aa55c8-e782-4a0a-9c3a-feeadc16b78c} + {60a29fff-f477-4dd6-bc68-20a3e3286849} + {f2821ad3-d81b-4c74-a01a-71474780814f} + {c34386ea-03e6-4409-9a3f-3bcbf5806004} + false + true + + + + Code + + + Code + true + + + Code + + + Code + + + + + + + + + + + Tc2_Standard, * (Beckhoff Automation GmbH) + Tc2_Standard + + + Tc2_System, * (Beckhoff Automation GmbH) + Tc2_System + + + Tc3_Module, * (Beckhoff Automation GmbH) + Tc3_Module + + + + + Content + + + + + + + + "<ProjectRoot>" + + {40450F57-0AA3-4216-96F3-5444ECB29763} + + "{40450F57-0AA3-4216-96F3-5444ECB29763}" + + + ActiveVisuProfile + IR0whWr8bwfwBwAAiD2qpQAAAABVAgAA37x72QAAAAABAAAAAAAAAAEaUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwACTHsAZgA5ADUAYgBiADQAMgA2AC0ANQA1ADIANAAtADQAYgA0ADUALQA5ADQAMAAwAC0AZgBiADAAZgAyAGUANwA3AGUANQAxAGIAfQADCE4AYQBtAGUABDBUAHcAaQBuAEMAQQBUACAAMwAuADEAIABCAHUAaQBsAGQAIAA0ADAAMgA0AC4ANwAFFlAAcgBvAGYAaQBsAGUARABhAHQAYQAGTHsAMQA2AGUANQA1AGIANgAwAC0ANwAwADQAMwAtADQAYQA2ADMALQBiADYANQBiAC0ANgAxADQANwAxADMAOAA3ADgAZAA0ADIAfQAHEkwAaQBiAHIAYQByAGkAZQBzAAhMewAzAGIAZgBkADUANAA1ADkALQBiADAANwBmAC0ANABkADYAZQAtAGEAZQAxAGEALQBhADgAMwAzADUANgBhADUANQAxADQAMgB9AAlMewA5AGMAOQA1ADgAOQA2ADgALQAyAGMAOAA1AC0ANAAxAGIAYgAtADgAOAA3ADEALQA4ADkANQBmAGYAMQBmAGUAZABlADEAYQB9AAoOVgBlAHIAcwBpAG8AbgALBmkAbgB0AAwKVQBzAGEAZwBlAA0KVABpAHQAbABlAA4aVgBpAHMAdQBFAGwAZQBtAE0AZQB0AGUAcgAPDkMAbwBtAHAAYQBuAHkAEAxTAHkAcwB0AGUAbQARElYAaQBzAHUARQBsAGUAbQBzABIwVgBpAHMAdQBFAGwAZQBtAHMAUwBwAGUAYwBpAGEAbABDAG8AbgB0AHIAbwBsAHMAEyhWAGkAcwB1AEUAbABlAG0AcwBXAGkAbgBDAG8AbgB0AHIAbwBsAHMAFCRWAGkAcwB1AEUAbABlAG0AVABlAHgAdABFAGQAaQB0AG8AcgAVIlYAaQBzAHUATgBhAHQAaQB2AGUAQwBvAG4AdAByAG8AbAAWFHYAaQBzAHUAaQBuAHAAdQB0AHMAFwxzAHkAcwB0AGUAbQAYGFYAaQBzAHUARQBsAGUAbQBCAGEAcwBlABkmRABlAHYAUABsAGEAYwBlAGgAbwBsAGQAZQByAHMAVQBzAGUAZAAaCGIAbwBvAGwAGyJQAGwAdQBnAGkAbgBDAG8AbgBzAHQAcgBhAGkAbgB0AHMAHEx7ADQAMwBkADUAMgBiAGMAZQAtADkANAAyAGMALQA0ADQAZAA3AC0AOQBlADkANAAtADEAYgBmAGQAZgAzADEAMABlADYAMwBjAH0AHRxBAHQATABlAGEAcwB0AFYAZQByAHMAaQBvAG4AHhRQAGwAdQBnAGkAbgBHAHUAaQBkAB8WUwB5AHMAdABlAG0ALgBHAHUAaQBkACBIYQBmAGMAZAA1ADQANAA2AC0ANAA5ADEANAAtADQAZgBlADcALQBiAGIANwA4AC0AOQBiAGYAZgBlAGIANwAwAGYAZAAxADcAIRRVAHAAZABhAHQAZQBJAG4AZgBvACJMewBiADAAMwAzADYANgBhADgALQBiADUAYwAwAC0ANABiADkAYQAtAGEAMAAwAGUALQBlAGIAOAA2ADAAMQAxADEAMAA0AGMAMwB9ACMOVQBwAGQAYQB0AGUAcwAkTHsAMQA4ADYAOABmAGYAYwA5AC0AZQA0AGYAYwAtADQANQAzADIALQBhAGMAMAA2AC0AMQBlADMAOQBiAGIANQA1ADcAYgA2ADkAfQAlTHsAYQA1AGIAZAA0ADgAYwAzAC0AMABkADEANwAtADQAMQBiADUALQBiADEANgA0AC0ANQBmAGMANgBhAGQAMgBiADkANgBiADcAfQAmFk8AYgBqAGUAYwB0AHMAVAB5AHAAZQAnVFUAcABkAGEAdABlAEwAYQBuAGcAdQBhAGcAZQBNAG8AZABlAGwARgBvAHIAQwBvAG4AdgBlAHIAdABpAGIAbABlAEwAaQBiAHIAYQByAGkAZQBzACgQTABpAGIAVABpAHQAbABlACkUTABpAGIAQwBvAG0AcABhAG4AeQAqHlUAcABkAGEAdABlAFAAcgBvAHYAaQBkAGUAcgBzACs4UwB5AHMAdABlAG0ALgBDAG8AbABsAGUAYwB0AGkAbwBuAHMALgBIAGEAcwBoAHQAYQBiAGwAZQAsEnYAaQBzAHUAZQBsAGUAbQBzAC1INgBjAGIAMQBjAGQAZQAxAC0AZAA1AGQAYwAtADQAYQAzAGIALQA5ADAANQA0AC0AMgAxAGYAYQA3ADUANgBhADMAZgBhADQALihJAG4AdABlAHIAZgBhAGMAZQBWAGUAcgBzAGkAbwBuAEkAbgBmAG8AL0x7AGMANgAxADEAZQA0ADAAMAAtADcAZgBiADkALQA0AGMAMwA1AC0AYgA5AGEAYwAtADQAZQAzADEANABiADUAOQA5ADYANAAzAH0AMBhNAGEAagBvAHIAVgBlAHIAcwBpAG8AbgAxGE0AaQBuAG8AcgBWAGUAcgBzAGkAbwBuADIMTABlAGcAYQBjAHkAMzBMAGEAbgBnAHUAYQBnAGUATQBvAGQAZQBsAFYAZQByAHMAaQBvAG4ASQBuAGYAbwA0MEwAbwBhAGQATABpAGIAcgBhAHIAaQBlAHMASQBuAHQAbwBQAHIAbwBqAGUAYwB0ADUaQwBvAG0AcABhAHQAaQBiAGkAbABpAHQAeQDQAAIaA9ADAS0E0AUGGgfQBwgaAUUHCQjQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtDtAPAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60BAAAA0A0BLRHQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0S0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAUAAAA0AwLrQIAAADQDQEtE9APAS0Q0AAJGgRFCgsEAwAAAAUAAAANAAAAAAAAANAMC60CAAAA0A0BLRTQDwEtENAACRoERQoLBAMAAAAFAAAADQAAAAAAAADQDAutAgAAANANAS0V0A8BLRDQAAkaBEUKCwQDAAAABQAAAA0AAAAAAAAA0AwLrQIAAADQDQEtFtAPAS0X0AAJGgRFCgsEAwAAAAUAAAANAAAAKAAAANAMC60EAAAA0A0BLRjQDwEtENAZGq0BRRscAdAAHBoCRR0LBAMAAAAFAAAADQAAAAAAAADQHh8tINAhIhoCRSMkAtAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAAAAANADAS0n0CgBLRHQKQEtENAAJRoFRQoLBAMAAAADAAAAAAAAAAoAAADQJgutAQAAANADAS0n0CgBLRHQKQEtEJoqKwFFAAEC0AABLSzQAAEtF9AAHy0t0C4vGgPQMAutAQAAANAxC60XAAAA0DIarQDQMy8aA9AwC60CAAAA0DELrQMAAADQMhqtANA0Gq0A0DUarQA= + + + {192FAD59-8248-4824-A8DE-9177C94C195A} + + "{192FAD59-8248-4824-A8DE-9177C94C195A}" + + + + + + + + + System.Collections.Hashtable + {54dd0eac-a6d8-46f2-8c27-2f43c7e49861} + System.String + + + + \ No newline at end of file diff --git a/plc/example/example/smallproject/PlcTask.TcTTO b/plc/example/src/Tasks/PlcTask.TcTTO similarity index 85% rename from plc/example/example/smallproject/PlcTask.TcTTO rename to plc/example/src/Tasks/PlcTask.TcTTO index 29574dc..d384faf 100644 --- a/plc/example/example/smallproject/PlcTask.TcTTO +++ b/plc/example/src/Tasks/PlcTask.TcTTO @@ -1,17 +1,16 @@ - - - - - 10000 - 20 - - MAIN - - {e75eccf1-4734-4003-a381-908429ec142e} - {531d44a7-3855-4784-9564-19c40ec016bb} - {b58bce52-91c0-4e9c-a208-8cc264db9b28} - {27696615-41f8-4e06-9e6b-d4c59aeee840} - {1c86b903-743e-4e71-b426-12bb7d8e1796} - - + + + + + 10000 + 20 + + Main + + {e75eccf1-4734-4003-a381-908429ec142e} + {531d44a7-3855-4784-9564-19c40ec016bb} + {b58bce52-91c0-4e9c-a208-8cc264db9b28} + {27696615-41f8-4e06-9e6b-d4c59aeee840} + {1c86b903-743e-4e71-b426-12bb7d8e1796} + \ No newline at end of file diff --git a/plc/example/example/smallproject/DUTs/DUTSample.TcDUT b/plc/example/src/Types/DUTSample.TcDUT similarity index 96% rename from plc/example/example/smallproject/DUTs/DUTSample.TcDUT rename to plc/example/src/Types/DUTSample.TcDUT index 3bd71af..7465c32 100644 --- a/plc/example/example/smallproject/DUTs/DUTSample.TcDUT +++ b/plc/example/src/Types/DUTSample.TcDUT @@ -1,13 +1,13 @@ - - - - - + + + + + \ No newline at end of file From 7a90957bd3b17de7e874884633c4244b6e66dff3 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Tue, 12 May 2026 14:32:33 +1000 Subject: [PATCH 19/24] Align example PLC symbols with CLI defaults Rename the example PLC global list and sample struct to the GVL_Global/ST_Sample naming scheme and update the example program accordingly. Update CLI read/write/subscription defaults and completions to target the renamed symbols, switch symbol upload info reads to UploadInfo2, and reuse shared ADS constants for client and CLI defaults. --- cmd/cli/cmd_control.go | 46 ++++++------- cmd/cli/cmd_read.go | 88 ++++++++++++++++++++---- cmd/cli/cmd_subscriptions.go | 18 ++--- cmd/cli/cmd_util.go | 27 ++++---- cmd/cli/cmd_write.go | 24 +++---- cmd/cli/commandline.go | 32 ++++----- cmd/main.go | 3 +- pkg/ads/client.go | 5 +- pkg/ads/client_symbols.go | 2 +- plc/example/src/AdsGo_Example.tsproj | 2 +- plc/example/src/Globals/GVL_Global.TcGVL | 39 +++++++++++ plc/example/src/Globals/Global.TcGVL | 33 --------- plc/example/src/Programs/Main.TcPOU | 55 +++++++-------- plc/example/src/SmallProject.plcproj | 4 +- plc/example/src/Types/DUTSample.TcDUT | 13 ---- plc/example/src/Types/ST_Sample.TcDUT | 13 ++++ 16 files changed, 233 insertions(+), 171 deletions(-) create mode 100644 plc/example/src/Globals/GVL_Global.TcGVL delete mode 100644 plc/example/src/Globals/Global.TcGVL delete mode 100644 plc/example/src/Types/DUTSample.TcDUT create mode 100644 plc/example/src/Types/ST_Sample.TcDUT diff --git a/cmd/cli/cmd_control.go b/cmd/cli/cmd_control.go index a9a8e2a..45ae03c 100644 --- a/cmd/cli/cmd_control.go +++ b/cmd/cli/cmd_control.go @@ -11,7 +11,7 @@ import ( // handleEnableCounter enables or disables the cycle-based integer counter. // Usage: enable_counter func handleEnableCounter(args []string, client *ads.Client) { - data := "Global.int_counter_active" + data := "GVL_Global.bIntCounterActive" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_counter': No value provided. Use 'true' or 'false'.") @@ -42,7 +42,7 @@ func handleEnableCounter(args []string, client *ads.Client) { // handleEnableToggle enables or disables the cycle-based boolean toggle. // Usage: enable_toggle func handleEnableToggle(args []string, client *ads.Client) { - data := "Global.bool_toggle_active" + data := "GVL_Global.bBoolToggleActive" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_toggle': No value provided. Use 'true' or 'false'.") @@ -73,7 +73,7 @@ func handleEnableToggle(args []string, client *ads.Client) { // handleEnableTimedCounter enables or disables the time-based integer counter. // Usage: enable_timed_counter func handleEnableTimedCounter(args []string, client *ads.Client) { - data := "Global.timed_counter_active" + data := "GVL_Global.bTimedCounterActive" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_timed_counter': No value provided. Use 'true' or 'false'.") @@ -104,7 +104,7 @@ func handleEnableTimedCounter(args []string, client *ads.Client) { // handleEnableTimedToggle enables or disables the time-based boolean toggle. // Usage: enable_timed_toggle func handleEnableTimedToggle(args []string, client *ads.Client) { - data := "Global.timed_toggle_active" + data := "GVL_Global.bTimedToggleActive" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'enable_timed_toggle': No value provided. Use 'true' or 'false'.") @@ -139,13 +139,13 @@ func handleReadCounters(args []string, client *ads.Client) { // List of variables to read vars := []string{ - "Global.int_counter", - "Global.bool_toggle", - "Global.timed_int_counter", - "Global.timed_bool_toggle", + "GVL_Global.nMyIntCounter", + "GVL_Global.bMyBoolToogle", + "GVL_Global.nTimedIntCounter", + "GVL_Global.bTimedBoolToogle", } - fmt.Println("[INFO] Reading counter and toggle values:") + fmt.Println("[INFO] Reading counter and toggle values from GVL_Global:") for _, varName := range vars { value, err := client.ReadValue(port, varName) if err != nil { @@ -162,26 +162,26 @@ func handleResetCounters(args []string, client *ads.Client) { var port uint16 = 852 // Reset cycle-based counter - if err := client.WriteValue(port, "Global.int_counter", 0); err != nil { - fmt.Printf("[ERROR] Failed to reset Global.int_counter: %v\n", err) + if err := client.WriteValue(port, "GVL_Global.nMyIntCounter", 0); err != nil { + fmt.Printf("[ERROR] Failed to reset GVL_Global.nMyIntCounter: %v\n", err) return } // Reset cycle-based toggle - if err := client.WriteValue(port, "Global.bool_toggle", false); err != nil { - fmt.Printf("[ERROR] Failed to reset Global.bool_toggle: %v\n", err) + if err := client.WriteValue(port, "GVL_Global.bMyBoolToogle", false); err != nil { + fmt.Printf("[ERROR] Failed to reset GVL_Global.bMyBoolToogle: %v\n", err) return } // Reset timed counter - if err := client.WriteValue(port, "Global.timed_int_counter", 0); err != nil { - fmt.Printf("[ERROR] Failed to reset Global.timed_int_counter: %v\n", err) + if err := client.WriteValue(port, "GVL_Global.nTimedIntCounter", 0); err != nil { + fmt.Printf("[ERROR] Failed to reset GVL_Global.nTimedIntCounter: %v\n", err) return } // Reset timed toggle - if err := client.WriteValue(port, "Global.timed_bool_toggle", false); err != nil { - fmt.Printf("[ERROR] Failed to reset Global.timed_bool_toggle: %v\n", err) + if err := client.WriteValue(port, "GVL_Global.bTimedBoolToogle", false); err != nil { + fmt.Printf("[ERROR] Failed to reset GVL_Global.bTimedBoolToogle: %v\n", err) return } @@ -195,10 +195,10 @@ func handleReadStatus(args []string, client *ads.Client) { // List of enable flags to read flags := []string{ - "Global.int_counter_active", - "Global.bool_toggle_active", - "Global.timed_int_counter_active", - "Global.timed_bool_toggle_active", + "GVL_Global.nIntCounterActive", + "GVL_Global.bBoolToggleActive", + "GVL_Global.nTimedCounterActive", + "GVL_Global.bTimedToggleActive", } fmt.Println("[INFO] Reading enable flag status:") @@ -219,7 +219,7 @@ func handleReadStatus(args []string, client *ads.Client) { // handleSetCyclePeriod sets the cycle period for timed operations. // Usage: set_period func handleSetCyclePeriod(args []string, client *ads.Client) { - data := "Global.cycle_period" + data := "GVL_Global.tCyclePeriod" var port uint16 = 852 if len(args) == 0 { @@ -252,7 +252,7 @@ func handleSetCyclePeriod(args []string, client *ads.Client) { // handleReadCyclePeriod reads the current cycle period. // Usage: read_period func handleReadCyclePeriod(args []string, client *ads.Client) { - data := "Global.cycle_period" + data := "GVL_Global.tCyclePeriod" var port uint16 = 852 value, err := client.ReadValue(port, data) diff --git a/cmd/cli/cmd_read.go b/cmd/cli/cmd_read.go index 07476d4..09f53c9 100644 --- a/cmd/cli/cmd_read.go +++ b/cmd/cli/cmd_read.go @@ -4,12 +4,13 @@ import ( "fmt" "github.com/jarmocluyse/ads-go/pkg/ads" + "github.com/jarmocluyse/ads-go/pkg/ads/types" ) // handleReadValue reads a generic value from the PLC. // Usage: read_value [symbol_path] [port] func handleReadValue(args []string, client *ads.Client) { - data := "Global.int_var" + data := "GVL_Global.nMyInt" var port uint16 = 852 // Parse arguments if provided @@ -31,7 +32,7 @@ func handleReadValue(args []string, client *ads.Client) { // handleReadBool reads a boolean value from the PLC. // Usage: read_bool [symbol_path] [port] func handleReadBool(args []string, client *ads.Client) { - data := "Global.bool_var" + data := "GVL_Global.bMyBool" var port uint16 = 852 // Parse arguments if provided @@ -53,7 +54,7 @@ func handleReadBool(args []string, client *ads.Client) { // handleReadObject reads a structured object from the PLC. // Usage: read_object func handleReadObject(args []string, client *ads.Client) { - data := "Global.test_struct" + data := "GVL_Global.stMySampleStruct" var port uint16 = 852 value, err := client.ReadValue(port, data) if err != nil { @@ -66,7 +67,7 @@ func handleReadObject(args []string, client *ads.Client) { // handleReadArray reads an array from the PLC. // Usage: read_array func handleReadArray(args []string, client *ads.Client) { - data := "Global.int_array" + data := "GVL_Global.aIntArray" var port uint16 = 852 value, err := client.ReadValue(port, data) if err != nil { @@ -81,26 +82,83 @@ func handleReadArray(args []string, client *ads.Client) { func handleListSymbols(args []string, client *ads.Client) { var port uint16 = 852 + // Parse port if provided if len(args) > 0 { fmt.Sscanf(args[0], "%d", &port) } - symbols, err := client.UploadSymbols(port) + // Use ReadRaw to get symbol upload info + data, err := client.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUploadInfo2), 0, 24) // ADSReservedIndexGroupSymbolUploadInfo2 if err != nil { - fmt.Printf("[ERROR] list_symbols: failed to upload symbols (port %d): %v\n", port, err) + fmt.Printf("[ERROR] Command 'list_symbols': Failed to get symbol info (port %d): %v\n", port, err) return } - const limit = 100 - shown := len(symbols) - if shown > limit { - shown = limit + if len(data) < 24 { + fmt.Printf("[ERROR] Command 'list_symbols': Insufficient data returned: %d bytes\n", len(data)) + return } - fmt.Printf("[OK] %d symbols total (showing first %d):\n", len(symbols), shown) - for i, sym := range symbols[:shown] { - fmt.Printf(" %3d: %-50s type=%-20s size=%d\n", i+1, sym.Name, sym.Type, sym.Size) + + // Parse symbol upload info (first 3 uint32s are what we need) + symbolCount := uint32(data[0]) | uint32(data[1])<<8 | uint32(data[2])<<16 | uint32(data[3])<<24 + symbolsSize := uint32(data[4]) | uint32(data[5])<<8 | uint32(data[6])<<16 | uint32(data[7])<<24 + + fmt.Printf("[INFO] Symbol Count: %d, Symbols Size: %d bytes\n", symbolCount, symbolsSize) + + // Now read the full symbol table + symbols, err := client.ReadRaw(port, 0xF00B, 0, symbolsSize) // ADSReservedIndexGroupSymbolUpload + if err != nil { + fmt.Printf("[ERROR] Command 'list_symbols': Failed to read symbol table (port %d): %v\n", port, err) + return } - if len(symbols) > limit { - fmt.Printf(" ... and %d more\n", len(symbols)-limit) + + fmt.Printf("[OK] Retrieved %d bytes of symbol data\n", len(symbols)) + fmt.Printf("First 100 symbols:\n") + + // Parse symbol entries - this is a simplified parser + offset := uint32(0) + count := 0 + for offset < uint32(len(symbols)) && count < 100 { + if offset+36 > uint32(len(symbols)) { + break + } + + // Read entry length (first uint32) + entryLength := uint32(symbols[offset]) | uint32(symbols[offset+1])<<8 | uint32(symbols[offset+2])<<16 | uint32(symbols[offset+3])<<24 + + if entryLength == 0 || offset+entryLength > uint32(len(symbols)) { + break + } + + // Skip to name offset (at byte 24) + nameOffset := offset + 24 + + // Read name length (uint16 at nameOffset) + if nameOffset+2 > uint32(len(symbols)) { + break + } + nameLength := uint16(symbols[nameOffset]) | uint16(symbols[nameOffset+1])<<8 + + // Read name string (starts at nameOffset+2) + nameStart := nameOffset + 2 + nameEnd := nameStart + uint32(nameLength) + + if nameEnd > uint32(len(symbols)) { + break + } + + name := string(symbols[nameStart:nameEnd]) + if len(name) > 0 && name[len(name)-1] == 0 { + name = name[:len(name)-1] // Remove null terminator + } + + fmt.Printf(" %3d: %s\n", count+1, name) + + count++ + offset += entryLength + } + + if symbolCount > 100 { + fmt.Printf("... and %d more symbols (showing first 100)\n", symbolCount-100) } } diff --git a/cmd/cli/cmd_subscriptions.go b/cmd/cli/cmd_subscriptions.go index c20278b..743f944 100644 --- a/cmd/cli/cmd_subscriptions.go +++ b/cmd/cli/cmd_subscriptions.go @@ -52,7 +52,7 @@ func createSubscriptionCallback(id int, path string) ads.SubscriptionCallback { func handleSubscribe(args []string, client *ads.Client) { // Hardcoded test configuration var port uint16 = 852 - path := "Global.bool_toggle" + path := "GVL_Global.bMyBoolToogle" // Allow optional path override if len(args) > 0 { @@ -211,7 +211,7 @@ func handleUnsubscribeAll(args []string, client *ads.Client) { // Usage: sub_counter func handleSubCounter(args []string, client *ads.Client) { var port uint16 = 852 - path := "Global.int_counter" + path := "GVL_Global.nMyIntCounter" settings := ads.SubscriptionSettings{ CycleTime: 100 * time.Millisecond, @@ -242,7 +242,7 @@ func handleSubCounter(args []string, client *ads.Client) { // Usage: sub_toggle func handleSubToggle(args []string, client *ads.Client) { var port uint16 = 852 - path := "Global.bool_toggle" + path := "GVL_Global.bMyBoolToogle" settings := ads.SubscriptionSettings{ CycleTime: 100 * time.Millisecond, @@ -273,7 +273,7 @@ func handleSubToggle(args []string, client *ads.Client) { // Usage: sub_timed_counter func handleSubTimedCounter(args []string, client *ads.Client) { var port uint16 = 852 - path := "Global.timed_int_counter" + path := "GVL_Global.nTimedIntCounter" settings := ads.SubscriptionSettings{ CycleTime: 500 * time.Millisecond, @@ -304,7 +304,7 @@ func handleSubTimedCounter(args []string, client *ads.Client) { // Usage: sub_timed_toggle func handleSubTimedToggle(args []string, client *ads.Client) { var port uint16 = 852 - path := "Global.timed_bool_toggle" + path := "GVL_Global.bTimedBoolToogle" settings := ads.SubscriptionSettings{ CycleTime: 500 * time.Millisecond, @@ -342,10 +342,10 @@ func handleSubAll(args []string, client *ads.Client) { cycleTime time.Duration name string }{ - {"Global.int_counter", 100 * time.Millisecond, "cycle-based counter"}, - {"Global.bool_toggle", 100 * time.Millisecond, "cycle-based toggle"}, - {"Global.timed_int_counter", 500 * time.Millisecond, "time-based counter"}, - {"Global.timed_bool_toggle", 500 * time.Millisecond, "time-based toggle"}, + {"GVL_Global.nMyIntCounter", 100 * time.Millisecond, "cycle-based counter"}, + {"GVL_Global.bMyBoolToogle", 100 * time.Millisecond, "cycle-based toggle"}, + {"GVL_Global.nTimedIntCounter", 500 * time.Millisecond, "time-based counter"}, + {"GVL_Global.bTimedBoolToogle", 500 * time.Millisecond, "time-based toggle"}, } createdIDs := []int{} diff --git a/cmd/cli/cmd_util.go b/cmd/cli/cmd_util.go index fd21169..15eac47 100644 --- a/cmd/cli/cmd_util.go +++ b/cmd/cli/cmd_util.go @@ -21,34 +21,33 @@ func handleHelp(args []string, client *ads.Client) { fmt.Println(" set_state - Switch TwinCAT state") fmt.Println("\nRead Commands:") - fmt.Println(" read_value - Read GLOBAL.gMyInt") - fmt.Println(" read_bool - Read GLOBAL.gMyBool") - fmt.Println(" read_object - Read GLOBAL.gMyDUT (struct)") - fmt.Println(" read_array - Read GLOBAL.gIntArray") + fmt.Println(" read_value - Read GVL_Global.nMyInt") + fmt.Println(" read_bool - Read GVL_Global.bMyBool") + fmt.Println(" read_object - Read GVL_Global.stMySampleStruct (struct)") + fmt.Println(" read_array - Read GVL_Global.aIntArray") fmt.Println(" list_symbols - List all available PLC symbols (first 100)") - fmt.Println(" read_attributes [path] [port] - Read type info, attributes, and value of a symbol") fmt.Println("\nWrite Commands:") - fmt.Println(" write_value - Write integer to GLOBAL.gMyInt") - fmt.Println(" write_bool - Write boolean to GLOBAL.gMyBool") - fmt.Println(" write_object Counter= Ready= - Write to GLOBAL.gMyDUT") - fmt.Println(" write_array - Write 5 ints to GLOBAL.gIntArray") + fmt.Println(" write_value - Write integer to GVL_Global.nMyInt") + fmt.Println(" write_bool - Write boolean to GVL_Global.bMyBool") + fmt.Println(" write_object Counter= Ready= - Write to GVL_Global.stMySampleStruct") + fmt.Println(" write_array - Write 5 ints to GVL_Global.aIntArray") fmt.Println("\nRaw Commands:") fmt.Println(" read_raw - Read raw data by index/offset") fmt.Println(" write_raw - Write raw data by index/offset") fmt.Println("\nSubscription Commands:") - fmt.Println(" subscribe [path] - Subscribe to variable changes (default: GLOBAL.gMyBoolToogle)") + fmt.Println(" subscribe [path] - Subscribe to variable changes (default: GVL_Global.bMyBoolToogle)") fmt.Println(" list_subs - List active subscriptions") fmt.Println(" unsubscribe - Unsubscribe by ID") fmt.Println(" unsubscribe_all - Unsubscribe from all") fmt.Println("\nSubscription Shortcuts (Quick subscriptions to example project variables):") - fmt.Println(" sub_counter - Subscribe to cycle-based counter (gMyIntCounter)") - fmt.Println(" sub_toggle - Subscribe to cycle-based toggle (gMyBoolToogle)") - fmt.Println(" sub_timed_counter - Subscribe to time-based counter (gTimedIntCounter)") - fmt.Println(" sub_timed_toggle - Subscribe to time-based toggle (gTimedBoolToogle)") + fmt.Println(" sub_counter - Subscribe to cycle-based counter (GVL_Global.nMyIntCounter)") + fmt.Println(" sub_toggle - Subscribe to cycle-based toggle (GVL_Global.bMyBoolToogle)") + fmt.Println(" sub_timed_counter - Subscribe to time-based counter (GVL_Global.nTimedIntCounter)") + fmt.Println(" sub_timed_toggle - Subscribe to time-based toggle (GVL_Global.bTimedBoolToogle)") fmt.Println(" sub_all - Subscribe to all counters/toggles at once") fmt.Println("\nControl Commands (for example project):") diff --git a/cmd/cli/cmd_write.go b/cmd/cli/cmd_write.go index 5d86a23..c20cfc5 100644 --- a/cmd/cli/cmd_write.go +++ b/cmd/cli/cmd_write.go @@ -11,7 +11,7 @@ import ( // handleWriteValue writes a numeric value to the PLC. // Usage: write_value func handleWriteValue(args []string, client *ads.Client) { - data := "Global.int_var" + data := "GVL_Global.nMyInt" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'write_value': No value provided to write.") @@ -38,7 +38,7 @@ func handleWriteValue(args []string, client *ads.Client) { // handleWriteBool writes a boolean value to the PLC. // Usage: write_bool func handleWriteBool(args []string, client *ads.Client) { - data := "Global.bool_var" + data := "GVL_Global.bMyBool" var port uint16 = 852 if len(args) == 0 { fmt.Println("[ERROR] Command 'write_bool': No value provided to write.") @@ -65,7 +65,7 @@ func handleWriteBool(args []string, client *ads.Client) { // handleWriteObject writes a structured object to the PLC. // Usage: write_object Counter= Ready= func handleWriteObject(args []string, client *ads.Client) { - data := "Global.test_struct" + data := "GVL_Global.stMySampleStruct" var port uint16 = 852 fields := map[string]string{} for _, arg := range args { @@ -80,22 +80,22 @@ func handleWriteObject(args []string, client *ads.Client) { object := map[string]any{} // Handle Counter (int) - counterStr, ok := fields["counter"] + counterStr, ok := fields["nCounter"] if !ok { - fmt.Println("[ERROR] Command 'write_object': Missing required field 'counter'.") + fmt.Println("[ERROR] Command 'write_object': Missing required field 'nCounter'.") return } counterVal, err := strconv.Atoi(counterStr) if err != nil { - fmt.Printf("[ERROR] Command 'write_object': Field 'counter' must be an integer, got '%s'.\n", counterStr) + fmt.Printf("[ERROR] Command 'write_object': Field 'nCounter' must be an integer, got '%s'.\n", counterStr) return } - object["counter"] = counterVal + object["nCounter"] = counterVal // Handle Ready (bool) - readyStr, ok := fields["ready"] + readyStr, ok := fields["bReady"] if !ok { - fmt.Println("[ERROR] Command 'write_object': Missing required field 'ready'.") + fmt.Println("[ERROR] Command 'write_object': Missing required field 'bReady'.") return } var readyVal bool @@ -105,10 +105,10 @@ func handleWriteObject(args []string, client *ads.Client) { case "false": readyVal = false default: - fmt.Println("[ERROR] Command 'write_object': Field 'ready' must be 'true' or 'false'.") + fmt.Println("[ERROR] Command 'write_object': Field 'bReady' must be 'true' or 'false'.") return } - object["ready"] = readyVal + object["bReady"] = readyVal err = client.WriteValue(port, data, object) if err != nil { @@ -121,7 +121,7 @@ func handleWriteObject(args []string, client *ads.Client) { // handleWriteArray writes an array of integers to the PLC. // Usage: write_array func handleWriteArray(args []string, client *ads.Client) { - data := "Global.int_array" + data := "GVL_Global.aIntArray" var port uint16 = 852 if len(args) != 5 { fmt.Printf("[ERROR] Command 'write_array': You must provide exactly 5 elements to write to the array. Got %d.\n", len(args)) diff --git a/cmd/cli/commandline.go b/cmd/cli/commandline.go index b283463..2955442 100644 --- a/cmd/cli/commandline.go +++ b/cmd/cli/commandline.go @@ -66,8 +66,8 @@ func Commandline(client *ads.Client) { readline.PcItem("read_array"), readline.PcItem("list_symbols"), readline.PcItem("read_attributes", - readline.PcItem("Main.var_with_standard_attribute"), - readline.PcItem("Main.var_with_custom_attribute"), + readline.PcItem("GVL_Global.nVarWithStandardAttribute"), + readline.PcItem("GVL_Global.nVarWithCustomAttribute"), ), // Write commands with argument completions @@ -88,20 +88,20 @@ func Commandline(client *ads.Client) { // Subscription commands with variable path completions readline.PcItem("subscribe", - readline.PcItem("Global.int_counter"), - readline.PcItem("Global.bool_toggle"), - readline.PcItem("Global.timed_int_counter"), - readline.PcItem("Global.timed_bool_toggle"), - readline.PcItem("Global.int_var"), - readline.PcItem("Global.bool_var"), - readline.PcItem("Global.dint_var"), - readline.PcItem("Global.int_counter_active"), - readline.PcItem("Global.bool_toggle_active"), - readline.PcItem("Global.timed_counter_active"), - readline.PcItem("Global.timed_toggle_active"), - readline.PcItem("Global.cycle_period"), - readline.PcItem("Global.int_array"), - readline.PcItem("Global.test_struct"), + readline.PcItem("GVL_Global.nMyIntCounter"), + readline.PcItem("GVL_Global.bMyBoolToogle"), + readline.PcItem("GVL_Global.nTimedIntCounter"), + readline.PcItem("GVL_Global.bTimedBoolToogle"), + readline.PcItem("GVL_Global.nMyInt"), + readline.PcItem("GVL_Global.bMyBool"), + readline.PcItem("GVL_Global.nMyDINT"), + readline.PcItem("GVL_Global.bIntCounterActive"), + readline.PcItem("GVL_Global.bBoolToggleActive"), + readline.PcItem("GVL_Global.bTimedCounterActive"), + readline.PcItem("GVL_Global.bTimedToggleActive"), + readline.PcItem("GVL_Global.tCyclePeriod"), + readline.PcItem("GVL_Global.aIntArray"), + readline.PcItem("GVL_Global.stMySampleStruct"), ), readline.PcItem("list_subs"), readline.PcItemDynamic(func(line string) []string { diff --git a/cmd/main.go b/cmd/main.go index 4345cba..15b3f03 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -11,6 +11,7 @@ import ( "github.com/jarmocluyse/ads-go/cmd/cli" "github.com/jarmocluyse/ads-go/pkg/ads" adsstateinfo "github.com/jarmocluyse/ads-go/pkg/ads/ads-stateinfo" + adsconstants "github.com/jarmocluyse/ads-go/pkg/ads/constants" "github.com/lmittmann/tint" ) @@ -33,7 +34,7 @@ func main() { defaultTargetNetID := envOrDefault("ADS_TARGET_NET_ID", "127.0.0.1.1.1") defaultRouterHost := envOrDefault("ADS_ROUTER_HOST", "127.0.0.1") - defaultRouterPort := 48898 + defaultRouterPort := adsconstants.ADSDefaultTCPPort if v := os.Getenv("ADS_ROUTER_PORT"); v != "" { if p, err := strconv.Atoi(v); err == nil { defaultRouterPort = p diff --git a/pkg/ads/client.go b/pkg/ads/client.go index 9d1034b..d64a196 100644 --- a/pkg/ads/client.go +++ b/pkg/ads/client.go @@ -10,6 +10,7 @@ import ( "time" "github.com/jarmocluyse/ads-go/pkg/ads/ads-stateinfo" + adsconstants "github.com/jarmocluyse/ads-go/pkg/ads/constants" ) // Response represents a response from an ADS device. @@ -94,13 +95,13 @@ type ClientSettings struct { // LoadDefaults sets the default values for any unset ClientSettings fields. func (cs *ClientSettings) LoadDefaults() { if cs.TargetNetID == "" || cs.TargetNetID == "localhost" { - cs.TargetNetID = "127.0.0.1.1.1" + cs.TargetNetID = adsconstants.LoopbackAmsNetID } if cs.RouterHost == "" { cs.RouterHost = "127.0.0.1" } if cs.RouterPort == 0 { - cs.RouterPort = 48898 + cs.RouterPort = adsconstants.ADSDefaultTCPPort } if cs.Timeout == 0 { cs.Timeout = 2 * time.Second diff --git a/pkg/ads/client_symbols.go b/pkg/ads/client_symbols.go index 00b1d3a..b08be1b 100644 --- a/pkg/ads/client_symbols.go +++ b/pkg/ads/client_symbols.go @@ -37,7 +37,7 @@ func (c *Client) GetSymbol(port uint16, path string) (*adssymbol.AdsSymbol, erro // UploadInfo returns the number of symbols and the total byte size of the // symbol table blob, read from ADS index group 0xF00C (SymbolUploadInfo). func (c *Client) UploadInfo(port uint16) (symCount uint32, symSize uint32, err error) { - data, err := c.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUploadInfo), 0, 8) + data, err := c.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUploadInfo2), 0, 8) if err != nil { return 0, 0, fmt.Errorf("UploadInfo: %w", err) } diff --git a/plc/example/src/AdsGo_Example.tsproj b/plc/example/src/AdsGo_Example.tsproj index ab22c54..da636e3 100644 --- a/plc/example/src/AdsGo_Example.tsproj +++ b/plc/example/src/AdsGo_Example.tsproj @@ -308,7 +308,7 @@ - + SmallProject Instance {08500001-0000-0000-F000-000000000064} diff --git a/plc/example/src/Globals/GVL_Global.TcGVL b/plc/example/src/Globals/GVL_Global.TcGVL new file mode 100644 index 0000000..9c3125c --- /dev/null +++ b/plc/example/src/Globals/GVL_Global.TcGVL @@ -0,0 +1,39 @@ + + + + + + \ No newline at end of file diff --git a/plc/example/src/Globals/Global.TcGVL b/plc/example/src/Globals/Global.TcGVL deleted file mode 100644 index 8080960..0000000 --- a/plc/example/src/Globals/Global.TcGVL +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/example/src/Programs/Main.TcPOU b/plc/example/src/Programs/Main.TcPOU index 35974df..930abeb 100644 --- a/plc/example/src/Programs/Main.TcPOU +++ b/plc/example/src/Programs/Main.TcPOU @@ -4,54 +4,51 @@ - +fbTimer(IN := TRUE, PT := GVL_Global.tCyclePeriod); + +IF fbTimer.Q THEN + // Do the same actions, but only on the tick + IF GVL_Global.bTimedCounterActive THEN + GVL_Global.nTimedIntCounter := GVL_Global.nTimedIntCounter + 1; + END_IF + + IF GVL_Global.bTimedToggleActive THEN + GVL_Global.bTimedBoolToogle := NOT GVL_Global.bTimedBoolToogle; + END_IF + + // Retrigger timer (create a periodic pulse) + fbTimer(IN := FALSE); +END_IF +]]> - + - + + + \ No newline at end of file diff --git a/plc/example/src/SmallProject.plcproj b/plc/example/src/SmallProject.plcproj index 2911bc9..a5a8878 100644 --- a/plc/example/src/SmallProject.plcproj +++ b/plc/example/src/SmallProject.plcproj @@ -20,10 +20,10 @@ true - + Code - + Code true diff --git a/plc/example/src/Types/DUTSample.TcDUT b/plc/example/src/Types/DUTSample.TcDUT deleted file mode 100644 index 7465c32..0000000 --- a/plc/example/src/Types/DUTSample.TcDUT +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/example/src/Types/ST_Sample.TcDUT b/plc/example/src/Types/ST_Sample.TcDUT new file mode 100644 index 0000000..b2b1928 --- /dev/null +++ b/plc/example/src/Types/ST_Sample.TcDUT @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file From 899bb2f5be613dcc079ec7b8d4a27ac764805de2 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Tue, 12 May 2026 16:50:41 +1000 Subject: [PATCH 20/24] test(plc): rename deterministic TwinCAT fixtures --- plc/testing/src/AdsGo_Det.plcproj | 18 +-- plc/testing/src/AdsGo_Det.tsproj | 2 +- ...ibuteTest.TcPOU => FB_AttributeTest.TcPOU} | 9 +- plc/testing/src/Lib/FB_StructTest.TcPOU | 52 ++++++ plc/testing/src/Lib/FB_TypeTest.TcPOU | 146 +++++++++++++++++ plc/testing/src/Lib/FB_WriteTest.TcPOU | 44 +++++ plc/testing/src/Lib/PackEight.TcDUT | 14 -- plc/testing/src/Lib/PackFour.TcDUT | 14 -- plc/testing/src/Lib/PackNone.TcDUT | 14 -- plc/testing/src/Lib/PackTwo.TcDUT | 14 -- plc/testing/src/Lib/ST_PackEight.TcDUT | 15 ++ plc/testing/src/Lib/ST_PackFour.TcDUT | 15 ++ plc/testing/src/Lib/ST_PackNone.TcDUT | 15 ++ plc/testing/src/Lib/ST_PackTwo.TcDUT | 15 ++ plc/testing/src/Lib/ST_TypeTestStruct.TcDUT | 40 +++++ plc/testing/src/Lib/StructTest.TcPOU | 51 ------ plc/testing/src/Lib/TypeTest.TcPOU | 150 ------------------ plc/testing/src/Lib/TypeTestStruct.TcDUT | 34 ---- plc/testing/src/Lib/WriteTest.TcPOU | 43 ----- plc/testing/src/Programs/Main.TcPOU | 25 +-- 20 files changed, 370 insertions(+), 360 deletions(-) rename plc/testing/src/Lib/{AttributeTest.TcPOU => FB_AttributeTest.TcPOU} (63%) create mode 100644 plc/testing/src/Lib/FB_StructTest.TcPOU create mode 100644 plc/testing/src/Lib/FB_TypeTest.TcPOU create mode 100644 plc/testing/src/Lib/FB_WriteTest.TcPOU delete mode 100644 plc/testing/src/Lib/PackEight.TcDUT delete mode 100644 plc/testing/src/Lib/PackFour.TcDUT delete mode 100644 plc/testing/src/Lib/PackNone.TcDUT delete mode 100644 plc/testing/src/Lib/PackTwo.TcDUT create mode 100644 plc/testing/src/Lib/ST_PackEight.TcDUT create mode 100644 plc/testing/src/Lib/ST_PackFour.TcDUT create mode 100644 plc/testing/src/Lib/ST_PackNone.TcDUT create mode 100644 plc/testing/src/Lib/ST_PackTwo.TcDUT create mode 100644 plc/testing/src/Lib/ST_TypeTestStruct.TcDUT delete mode 100644 plc/testing/src/Lib/StructTest.TcPOU delete mode 100644 plc/testing/src/Lib/TypeTest.TcPOU delete mode 100644 plc/testing/src/Lib/TypeTestStruct.TcDUT delete mode 100644 plc/testing/src/Lib/WriteTest.TcPOU diff --git a/plc/testing/src/AdsGo_Det.plcproj b/plc/testing/src/AdsGo_Det.plcproj index f888a30..1d9a8f7 100644 --- a/plc/testing/src/AdsGo_Det.plcproj +++ b/plc/testing/src/AdsGo_Det.plcproj @@ -18,31 +18,31 @@ {c34386ea-03e6-4409-9a3f-3bcbf5806004} - + Code - + Code - + Code - + Code - + Code - + Code - + Code - + Code - + Code diff --git a/plc/testing/src/AdsGo_Det.tsproj b/plc/testing/src/AdsGo_Det.tsproj index 27d2514..aa052fd 100644 --- a/plc/testing/src/AdsGo_Det.tsproj +++ b/plc/testing/src/AdsGo_Det.tsproj @@ -15,7 +15,7 @@ - + AdsGo_Det Instance {08500001-0000-0000-F000-000000000064} diff --git a/plc/testing/src/Lib/AttributeTest.TcPOU b/plc/testing/src/Lib/FB_AttributeTest.TcPOU similarity index 63% rename from plc/testing/src/Lib/AttributeTest.TcPOU rename to plc/testing/src/Lib/FB_AttributeTest.TcPOU index c00ade6..3ae0935 100644 --- a/plc/testing/src/Lib/AttributeTest.TcPOU +++ b/plc/testing/src/Lib/FB_AttributeTest.TcPOU @@ -1,15 +1,16 @@  - + +END_VAR +]]> - + diff --git a/plc/testing/src/Lib/FB_StructTest.TcPOU b/plc/testing/src/Lib/FB_StructTest.TcPOU new file mode 100644 index 0000000..e38cb87 --- /dev/null +++ b/plc/testing/src/Lib/FB_StructTest.TcPOU @@ -0,0 +1,52 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/FB_TypeTest.TcPOU b/plc/testing/src/Lib/FB_TypeTest.TcPOU new file mode 100644 index 0000000..9bd6e32 --- /dev/null +++ b/plc/testing/src/Lib/FB_TypeTest.TcPOU @@ -0,0 +1,146 @@ + + + + + + = nAutoTickInterval THEN + nSeed := nSeed + 1; + nTtickCounter := 0; + ELSE + nTtickCounter := nTtickCounter + 1; + END_IF +END_IF + +// ----------------------------------------------------------------------- +// Update variables — all fields are deterministic functions of seed +// ----------------------------------------------------------------------- +bBoolVar := (nSeed MOD 2 = 0); +nSintVar := UDINT_TO_SINT(nSeed); +nUsintVar := UDINT_TO_USINT(nSeed); +nByteVar := UDINT_TO_BYTE(nSeed); +nIntVar := UDINT_TO_INT(nSeed); +nUintVar := UDINT_TO_UINT(nSeed); +nWordVar := UDINT_TO_WORD(nSeed); +nDintVar := UDINT_TO_DINT(nSeed); +nUdintVar := nSeed; +nDwordVar := UDINT_TO_DWORD(nSeed); +nLintVar := UDINT_TO_LINT(nSeed); +nUlintVar := UDINT_TO_ULINT(nSeed); +nLwordVar := UDINT_TO_LWORD(nSeed); +fRealVar := UDINT_TO_REAL(nSeed); +fLrealVar := UDINT_TO_LREAL(nSeed); + +// Date/time types — raw truncating casts, same bit pattern Go test will verify +tTimeVar := UDINT_TO_TIME(nSeed); +tdTimeOfDayVar := UDINT_TO_TOD(nSeed MOD 86400000); +dDateVar := UDINT_TO_DATE(nSeed); +dtDateTimeVar := UDINT_TO_DT(nSeed); +//tLTimeVar := ULINT_TO_LTIME(UDINT_TO_ULINT(nSeed)); +//tdLTimeOfDayVar := ULINT_TO_LTOD(UDINT_TO_ULINT(nSeed) MOD 86400000000000); +//dLDateVar := ULINT_TO_LDATE(UDINT_TO_ULINT(nSeed)); +//dtLDateTimeVar := ULINT_TO_LDT(UDINT_TO_ULINT(nSeed)); +sStringVar := CONCAT('S=', UDINT_TO_STRING(nSeed)); + +// ----------------------------------------------------------------------- +// Update test struct — all fields are deterministic functions of seed +// ----------------------------------------------------------------------- +stStructVar.nSeed := nSeed; + +stStructVar.bBoolVar := bBoolVar; +stStructVar.nSintVar := nSintVar; +stStructVar.nUsintVar := nUsintVar; +stStructVar.nByteVar := nByteVar; +stStructVar.nIntVar := nIntVar; +stStructVar.nUintVar := nUintVar; +stStructVar.nWordVar := nWordVar; +stStructVar.nDintVar := nDintVar; +stStructVar.nUdintVar := nUdintVar; +stStructVar.nDwordVar := nDwordVar; +stStructVar.nLintVar := nLintVar; +stStructVar.nUlintVar := nUlintVar; +stStructVar.nLwordVar := nLwordVar; +stStructVar.fRealVar := fRealVar; +stStructVar.fLrealVar := fLrealVar; +stStructVar.tTimeVar := tTimeVar; +stStructVar.tdTimeOfDayVar := tdTimeOfDayVar; +stStructVar.dDateVar := dDateVar; +stStructVar.dtDateTimeVar := dtDateTimeVar; +//struct_var.tLTimeVar := ltime_var; +//struct_var.tdLTimeOfDayVar := ltod_var; +//struct_var.dLDateVar := ldate_var; +//struct_var.dtLDateTimeVar := ldt_var; +stStructVar.sStringVar := sStringVar; + +// ----------------------------------------------------------------------- +// Update 1-D arrays: element[i] = UDINT_TO_x(seed + i) +// ----------------------------------------------------------------------- +FOR nLoopIndex1 := 0 TO 9 DO + aIntArray[nLoopIndex1] := UDINT_TO_INT(nSeed + nLoopIndex1); + aDintArray[nLoopIndex1] := UDINT_TO_DINT(nSeed + nLoopIndex1); +END_FOR + +// ----------------------------------------------------------------------- +// Update 2-D array: element[i,j] = UDINT_TO_INT(seed + i*3 + j) +// ----------------------------------------------------------------------- +FOR nLoopIndex1 := 0 TO 2 DO + FOR nLoopIndex2 := 0 TO 2 DO + aIntArray2d[nLoopIndex1, nLoopIndex2] := UDINT_TO_INT(nSeed + nLoopIndex1 * 3 + nLoopIndex2); + END_FOR +END_FOR +]]> + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/FB_WriteTest.TcPOU b/plc/testing/src/Lib/FB_WriteTest.TcPOU new file mode 100644 index 0000000..acf38da --- /dev/null +++ b/plc/testing/src/Lib/FB_WriteTest.TcPOU @@ -0,0 +1,44 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/PackEight.TcDUT b/plc/testing/src/Lib/PackEight.TcDUT deleted file mode 100644 index a69b05e..0000000 --- a/plc/testing/src/Lib/PackEight.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/PackFour.TcDUT b/plc/testing/src/Lib/PackFour.TcDUT deleted file mode 100644 index a66a6ab..0000000 --- a/plc/testing/src/Lib/PackFour.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/PackNone.TcDUT b/plc/testing/src/Lib/PackNone.TcDUT deleted file mode 100644 index 1b6e645..0000000 --- a/plc/testing/src/Lib/PackNone.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/PackTwo.TcDUT b/plc/testing/src/Lib/PackTwo.TcDUT deleted file mode 100644 index 336bf4a..0000000 --- a/plc/testing/src/Lib/PackTwo.TcDUT +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/ST_PackEight.TcDUT b/plc/testing/src/Lib/ST_PackEight.TcDUT new file mode 100644 index 0000000..6754447 --- /dev/null +++ b/plc/testing/src/Lib/ST_PackEight.TcDUT @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/ST_PackFour.TcDUT b/plc/testing/src/Lib/ST_PackFour.TcDUT new file mode 100644 index 0000000..ab5db55 --- /dev/null +++ b/plc/testing/src/Lib/ST_PackFour.TcDUT @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/ST_PackNone.TcDUT b/plc/testing/src/Lib/ST_PackNone.TcDUT new file mode 100644 index 0000000..1c6284b --- /dev/null +++ b/plc/testing/src/Lib/ST_PackNone.TcDUT @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/ST_PackTwo.TcDUT b/plc/testing/src/Lib/ST_PackTwo.TcDUT new file mode 100644 index 0000000..6fe2fff --- /dev/null +++ b/plc/testing/src/Lib/ST_PackTwo.TcDUT @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/ST_TypeTestStruct.TcDUT b/plc/testing/src/Lib/ST_TypeTestStruct.TcDUT new file mode 100644 index 0000000..44cd62d --- /dev/null +++ b/plc/testing/src/Lib/ST_TypeTestStruct.TcDUT @@ -0,0 +1,40 @@ + + + + + + \ No newline at end of file diff --git a/plc/testing/src/Lib/StructTest.TcPOU b/plc/testing/src/Lib/StructTest.TcPOU deleted file mode 100644 index e1ec557..0000000 --- a/plc/testing/src/Lib/StructTest.TcPOU +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/TypeTest.TcPOU b/plc/testing/src/Lib/TypeTest.TcPOU deleted file mode 100644 index 8797b24..0000000 --- a/plc/testing/src/Lib/TypeTest.TcPOU +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - = auto_tick_interval THEN - seed := seed + 1; - _tick_counter := 0; - ELSE - _tick_counter := _tick_counter + 1; - END_IF -END_IF - -// ----------------------------------------------------------------------- -// Update variables — all fields are deterministic functions of seed -// ----------------------------------------------------------------------- -bool_var := (seed MOD 2 = 0); -sint_var := UDINT_TO_SINT(seed); -usint_var := UDINT_TO_USINT(seed); -byte_var := UDINT_TO_BYTE(seed); -int_var := UDINT_TO_INT(seed); -uint_var := UDINT_TO_UINT(seed); -word_var := UDINT_TO_WORD(seed); -dint_var := UDINT_TO_DINT(seed); -udint_var := seed; -dword_var := UDINT_TO_DWORD(seed); -lint_var := UDINT_TO_LINT(seed); -ulint_var := UDINT_TO_ULINT(seed); -lword_var := UDINT_TO_LWORD(seed); -real_var := UDINT_TO_REAL(seed); -lreal_var := UDINT_TO_LREAL(seed); - -// Date/time types — raw truncating casts, same bit pattern Go test will verify -time_var := UDINT_TO_TIME(seed); -tod_var := UDINT_TO_TOD(seed MOD 86400000); -date_var := UDINT_TO_DATE(seed); -dt_var := UDINT_TO_DT(seed); -//ltime_var := ULINT_TO_LTIME(UDINT_TO_ULINT(seed)); -//ltod_var := ULINT_TO_LTOD(UDINT_TO_ULINT(seed) MOD 86400000000000); -//ldate_var := ULINT_TO_LDATE(UDINT_TO_ULINT(seed)); -//ldt_var := ULINT_TO_LDT(UDINT_TO_ULINT(seed)); - -string_var := CONCAT('S=', UDINT_TO_STRING(seed)); - -// ----------------------------------------------------------------------- -// Update test struct — all fields are deterministic functions of seed -// ----------------------------------------------------------------------- -struct_var.seed := seed; - -struct_var.bool_var := bool_var; -struct_var.sint_var := sint_var; -struct_var.usint_var := usint_var; -struct_var.byte_var := byte_var; -struct_var.int_var := int_var; -struct_var.uint_var := uint_var; -struct_var.word_var := word_var; -struct_var.dint_var := dint_var; -struct_var.udint_var := udint_var; -struct_var.dword_var := dword_var; -struct_var.lint_var := lint_var; -struct_var.ulint_var := ulint_var; -struct_var.lword_var := lword_var; -struct_var.real_var := real_var; -struct_var.lreal_var := lreal_var; -struct_var.time_var := time_var; -struct_var.tod_var := tod_var; -struct_var.date_var := date_var; -struct_var.dt_var := dt_var; -//struct_var.ltime_var := ltime_var; -//struct_var.ltod_var := ltod_var; -//struct_var.ldate_var := ldate_var; -//struct_var.ldt_var := ldt_var; -struct_var.string_var := string_var; - -// ----------------------------------------------------------------------- -// Update 1-D arrays: element[i] = UDINT_TO_x(seed + i) -// ----------------------------------------------------------------------- -FOR _i := 0 TO 9 DO - int_array[_i] := UDINT_TO_INT(seed + _i); - dint_array[_i] := UDINT_TO_DINT(seed + _i); -END_FOR - -// ----------------------------------------------------------------------- -// Update 2-D array: element[i,j] = UDINT_TO_INT(seed + i*3 + j) -// ----------------------------------------------------------------------- -FOR _i := 0 TO 2 DO - FOR _j := 0 TO 2 DO - int_array_2d[_i, _j] := UDINT_TO_INT(seed + _i * 3 + _j); - END_FOR -END_FOR]]> - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/TypeTestStruct.TcDUT b/plc/testing/src/Lib/TypeTestStruct.TcDUT deleted file mode 100644 index ad67b1f..0000000 --- a/plc/testing/src/Lib/TypeTestStruct.TcDUT +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Lib/WriteTest.TcPOU b/plc/testing/src/Lib/WriteTest.TcPOU deleted file mode 100644 index b305fe3..0000000 --- a/plc/testing/src/Lib/WriteTest.TcPOU +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/plc/testing/src/Programs/Main.TcPOU b/plc/testing/src/Programs/Main.TcPOU index c8067a9..db5f6e5 100644 --- a/plc/testing/src/Programs/Main.TcPOU +++ b/plc/testing/src/Programs/Main.TcPOU @@ -3,25 +3,26 @@ + fbAttributeTest : FB_AttributeTest; +END_VAR +]]> - + - - - + + \ No newline at end of file From 3412e16976e5abb9e5916c1a0759079fe36787b9 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Tue, 12 May 2026 16:50:48 +1000 Subject: [PATCH 21/24] test(integration): sync ADS paths and load env files --- .gitignore | 1 + TESTING.md | 17 +- go.mod | 5 +- go.sum | 2 + test/integration/plc_test.go | 482 +++++++++++++++++++++-------------- 5 files changed, 307 insertions(+), 200 deletions(-) diff --git a/.gitignore b/.gitignore index dfc4e4d..e9ddba6 100644 --- a/.gitignore +++ b/.gitignore @@ -91,6 +91,7 @@ LineIDs.dbg.bak # Environment and config files (if you add these) .env +.env.integration .env.local *.local diff --git a/TESTING.md b/TESTING.md index 567067e..fc7f764 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,10 +1,25 @@ # Testing -First be sure to set your ADS target NetId +First be sure to provide your ADS target NetId. You can do that either in the shell or via an env file that the integration tests load automatically. + +Using PowerShell: ```pwsh $env:ADS_TARGET_NET_ID = "199.4.42.250.1.1" ``` +Using an env file: +```dotenv +ADS_TARGET_NET_ID=199.4.42.250.1.1 +ADS_ROUTER_HOST=127.0.0.1 +``` + +Integration tests look for the first existing file in this order: +- the path in `ADS_TEST_ENV_FILE` +- `test/integration/.env.integration` +- `test/integration/.env` +- `.env.integration` at the repo root +- `.env` at the repo root + - Run all unit tests across the repo (excludes integration build-tag tests): ```pwsh go test ./... diff --git a/go.mod b/go.mod index dc63010..f8220ac 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,10 @@ module github.com/jarmocluyse/ads-go go 1.24.4 -require github.com/stretchr/testify v1.11.1 +require ( + github.com/joho/godotenv v1.5.1 + github.com/stretchr/testify v1.11.1 +) require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/go.sum b/go.sum index c4c1710..ae38d6f 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= diff --git a/test/integration/plc_test.go b/test/integration/plc_test.go index f77e5fd..3b0ff75 100644 --- a/test/integration/plc_test.go +++ b/test/integration/plc_test.go @@ -5,24 +5,83 @@ package integration import ( "fmt" "os" + "path/filepath" + "runtime" + "sync" "testing" "time" "github.com/jarmocluyse/ads-go/pkg/ads" adssymbol "github.com/jarmocluyse/ads-go/pkg/ads/ads-symbol" + "github.com/joho/godotenv" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) const plcPort = 852 +var ( + loadIntegrationEnvOnce sync.Once + loadIntegrationEnvErr error +) + +func integrationEnvCandidates() []string { + seen := map[string]struct{}{} + candidates := make([]string, 0, 6) + + add := func(path string) { + if path == "" { + return + } + cleanPath := filepath.Clean(path) + if _, exists := seen[cleanPath]; exists { + return + } + seen[cleanPath] = struct{}{} + candidates = append(candidates, cleanPath) + } + + add(os.Getenv("ADS_TEST_ENV_FILE")) + add(".env.integration") + add(".env") + + if _, currentFile, _, ok := runtime.Caller(0); ok { + integrationDir := filepath.Dir(currentFile) + repoRoot := filepath.Clean(filepath.Join(integrationDir, "..", "..")) + + add(filepath.Join(integrationDir, ".env.integration")) + add(filepath.Join(integrationDir, ".env")) + add(filepath.Join(repoRoot, ".env.integration")) + add(filepath.Join(repoRoot, ".env")) + } + + return candidates +} + +func loadIntegrationEnv() { + loadIntegrationEnvOnce.Do(func() { + for _, candidate := range integrationEnvCandidates() { + info, err := os.Stat(candidate) + if err != nil || info.IsDir() { + continue + } + loadIntegrationEnvErr = godotenv.Load(candidate) + return + } + }) +} + // newClient creates an ADS client from environment variables and registers cleanup. // ADS_TARGET_NET_ID is required. ADS_ROUTER_HOST defaults to 127.0.0.1. +// The tests also try to load a .env.integration or .env file from the repo root +// or the test/integration directory before checking the environment. func newClient(t *testing.T) *ads.Client { t.Helper() + loadIntegrationEnv() + require.NoError(t, loadIntegrationEnvErr, "load integration env file") targetNetID := os.Getenv("ADS_TARGET_NET_ID") - require.NotEmpty(t, targetNetID, "ADS_TARGET_NET_ID env var must be set (e.g. 192.168.1.5.1.1)") + require.NotEmpty(t, targetNetID, "ADS_TARGET_NET_ID env var must be set (e.g. 192.168.1.5.1.1), or provided via .env.integration/.env or ADS_TEST_ENV_FILE") settings := ads.ClientSettings{ TargetNetID: targetNetID, @@ -108,72 +167,75 @@ func assertSnapshot(t *testing.T, raw any, seed uint32) { exp := expectedValues(seed) - assert.Equal(t, exp.Seed, m["seed"], "seed") - assert.Equal(t, exp.Bool, m["bool_var"], "bool_var") - assert.Equal(t, exp.Sint, m["sint_var"], "sint_var") - assert.Equal(t, exp.Usint, m["usint_var"], "usint_var") - assert.Equal(t, exp.Byte_, m["byte_var"], "byte_var") - assert.Equal(t, exp.Int, m["int_var"], "int_var") - assert.Equal(t, exp.Uint, m["uint_var"], "uint_var") - assert.Equal(t, exp.Word, m["word_var"], "word_var") - assert.Equal(t, exp.Dint, m["dint_var"], "dint_var") - assert.Equal(t, exp.Udint, m["udint_var"], "udint_var") - assert.Equal(t, exp.Dword, m["dword_var"], "dword_var") - assert.Equal(t, exp.Lint, m["lint_var"], "lint_var") - assert.Equal(t, exp.Ulint, m["ulint_var"], "ulint_var") - assert.Equal(t, exp.Lword, m["lword_var"], "lword_var") + assert.Equal(t, exp.Seed, m["nSeed"], "nSeed") + assert.Equal(t, exp.Bool, m["bBoolVar"], "bBoolVar") + assert.Equal(t, exp.Sint, m["nSintVar"], "nSintVar") + assert.Equal(t, exp.Usint, m["nUsintVar"], "nUsintVar") + assert.Equal(t, exp.Byte_, m["nByteVar"], "nByteVar") + assert.Equal(t, exp.Int, m["nIntVar"], "nIntVar") + assert.Equal(t, exp.Uint, m["nUintVar"], "nUintVar") + assert.Equal(t, exp.Word, m["nWordVar"], "nWordVar") + assert.Equal(t, exp.Dint, m["nDintVar"], "nDintVar") + assert.Equal(t, exp.Udint, m["nUdintVar"], "nUdintVar") + assert.Equal(t, exp.Dword, m["nDwordVar"], "nDwordVar") + assert.Equal(t, exp.Lint, m["nLintVar"], "nLintVar") + assert.Equal(t, exp.Ulint, m["nUlintVar"], "nUlintVar") + assert.Equal(t, exp.Lword, m["nLwordVar"], "nLwordVar") // float32 is only exact for seeds ≤ 2^24-1 = 16_777_215 if seed <= 16_777_215 { - assert.Equal(t, exp.Real, m["real_var"], "real_var") + assert.Equal(t, exp.Real, m["fRealVar"], "fRealVar") } - assert.Equal(t, exp.Lreal, m["lreal_var"], "lreal_var") - assert.Equal(t, exp.Time_, m["time_var"], "time_var") - assert.Equal(t, exp.Tod, m["tod_var"], "tod_var") - assert.Equal(t, exp.Date, m["date_var"], "date_var") - assert.Equal(t, exp.Dt, m["dt_var"], "dt_var") - // ltime_var / ltod_var / ldate_var / ldt_var not supported in TC 4024 - assert.Equal(t, exp.String, m["string_var"], "string_var") + assert.Equal(t, exp.Lreal, m["fLrealVar"], "fLrealVar") + assert.Equal(t, exp.Time_, m["tTimeVar"], "tTimeVar") + assert.Equal(t, exp.Tod, m["tdTimeOfDayVar"], "tdTimeOfDayVar") + assert.Equal(t, exp.Date, m["dDateVar"], "dDateVar") + assert.Equal(t, exp.Dt, m["dtDateTimeVar"], "dtDateTimeVar") + // ltime_var / ltod_var / ldate_var / ldt_var not tested + assert.Equal(t, exp.String, m["sStringVar"], "sStringVar") } func assertIntArray(t *testing.T, raw any, seed uint32) { t.Helper() + name := "aIntArray" arr, ok := raw.([]any) - require.Truef(t, ok, "int_array: expected []any, got %T", raw) - require.Len(t, arr, 10, "int_array length") + require.Truef(t, ok, "%s: expected []any, got %T", name, raw) + require.Len(t, arr, 10, "%s length", name) for i, v := range arr { - assert.Equal(t, int16(seed+uint32(i)), v, "int_array[%d]", i) + assert.Equal(t, int16(seed+uint32(i)), v, "%s [%d]", name, i) } } func assertDintArray(t *testing.T, raw any, seed uint32) { t.Helper() + name := "aDintArray" arr, ok := raw.([]any) - require.Truef(t, ok, "dint_array: expected []any, got %T", raw) - require.Len(t, arr, 10, "dint_array length") + require.Truef(t, ok, "%s: expected []any, got %T", name, raw) + require.Len(t, arr, 10, "%s length", name) for i, v := range arr { - assert.Equal(t, int32(seed+uint32(i)), v, "dint_array[%d]", i) + assert.Equal(t, int32(seed+uint32(i)), v, "%s[%d]", name, i) } } func assert2DArray(t *testing.T, raw any, seed uint32) { t.Helper() + name := "aIntArray2d" outer, ok := raw.([]any) - require.Truef(t, ok, "array_2d: expected []any, got %T", raw) - require.Len(t, outer, 3, "array_2d outer dimension") + require.Truef(t, ok, "%s: expected []any, got %T", name, raw) + require.Len(t, outer, 3, "%s outer dimension", name) for i, row := range outer { inner, ok := row.([]any) - require.Truef(t, ok, "array_2d[%d]: expected []any, got %T", i, row) - require.Len(t, inner, 3, "array_2d[%d] inner dimension", i) + require.Truef(t, ok, "%s[%d]: expected []any, got %T", name, i, row) + require.Len(t, inner, 3, "%s[%d] inner dimension", name, i) for j, v := range inner { - assert.Equal(t, int16(seed+uint32(i)*3+uint32(j)), v, "array_2d[%d][%d]", i, j) + assert.Equal(t, int16(seed+uint32(i)*3+uint32(j)), v, "%s[%d][%d]", name, i, j) } } } // assertLinear reads every scalar field individually from basePath and checks // against the deterministic expectation for the given seed. -// Works for flat FB vars (base = "Main.test") and struct linear access -// (base = "Main.test.struct_var" or "Main.write_struct_var"). +// Works for flat FB vars (base = "Main.fbTypeTest") and struct linear access +// (base = "Main.fbTypeTest.stStructVar" or "Main.fbWriteTest.stStructVar"). func assertLinear(t *testing.T, client *ads.Client, base string, seed uint32) { t.Helper() exp := expectedValues(seed) @@ -185,30 +247,33 @@ func assertLinear(t *testing.T, client *ads.Client, base string, seed uint32) { return got } - assert.Equal(t, exp.Seed, read("seed"), "seed") - assert.Equal(t, exp.Bool, read("bool_var"), "bool_var") - assert.Equal(t, exp.Sint, read("sint_var"), "sint_var") - assert.Equal(t, exp.Usint, read("usint_var"), "usint_var") - assert.Equal(t, exp.Byte_, read("byte_var"), "byte_var") - assert.Equal(t, exp.Int, read("int_var"), "int_var") - assert.Equal(t, exp.Uint, read("uint_var"), "uint_var") - assert.Equal(t, exp.Word, read("word_var"), "word_var") - assert.Equal(t, exp.Dint, read("dint_var"), "dint_var") - assert.Equal(t, exp.Udint, read("udint_var"), "udint_var") - assert.Equal(t, exp.Dword, read("dword_var"), "dword_var") - assert.Equal(t, exp.Lint, read("lint_var"), "lint_var") - assert.Equal(t, exp.Ulint, read("ulint_var"), "ulint_var") - assert.Equal(t, exp.Lword, read("lword_var"), "lword_var") + assert.Equal(t, exp.Seed, read("nSeed"), "nSeed") + assert.Equal(t, exp.Bool, read("bBoolVar"), "bBoolVar") + assert.Equal(t, exp.Sint, read("nSintVar"), "nSintVar") + assert.Equal(t, exp.Usint, read("nUsintVar"), "nUsintVar") + assert.Equal(t, exp.Byte_, read("nByteVar"), "nByteVar") + assert.Equal(t, exp.Int, read("nIntVar"), "nIntVar") + assert.Equal(t, exp.Uint, read("nUintVar"), "nUintVar") + assert.Equal(t, exp.Word, read("nWordVar"), "nWordVar") + assert.Equal(t, exp.Dint, read("nDintVar"), "nDintVar") + assert.Equal(t, exp.Udint, read("nUdintVar"), "nUdintVar") + assert.Equal(t, exp.Dword, read("nDwordVar"), "nDwordVar") + assert.Equal(t, exp.Lint, read("nLintVar"), "nLintVar") + assert.Equal(t, exp.Ulint, read("nUlintVar"), "nUlintVar") + assert.Equal(t, exp.Lword, read("nLwordVar"), "nLwordVar") if seed <= 16_777_215 { - assert.Equal(t, exp.Real, read("real_var"), "real_var") + assert.Equal(t, exp.Real, read("fRealVar"), "fRealVar") } - assert.Equal(t, exp.Lreal, read("lreal_var"), "lreal_var") - assert.Equal(t, exp.Time_, read("time_var"), "time_var") - assert.Equal(t, exp.Tod, read("tod_var"), "tod_var") - assert.Equal(t, exp.Date, read("date_var"), "date_var") - assert.Equal(t, exp.Dt, read("dt_var"), "dt_var") - // ltime_var / ltod_var / ldate_var / ldt_var not supported in TC 4024 - assert.Equal(t, exp.String, read("string_var"), "string_var") + assert.Equal(t, exp.Lreal, read("fLrealVar"), "fLrealVar") + assert.Equal(t, exp.Time_, read("tTimeVar"), "tTimeVar") + assert.Equal(t, exp.Tod, read("tdTimeOfDayVar"), "tdTimeOfDayVar") + assert.Equal(t, exp.Date, read("dDateVar"), "dDateVar") + assert.Equal(t, exp.Dt, read("dtDateTimeVar"), "dtDateTimeVar") + // assert.Equal(t, exp.Time_, read("tLTimeVar"), "tLTimeVar") + // assert.Equal(t, exp.Tod, read("tdLTimeOfDayVar"), "tdLTimeOfDayVar") + // assert.Equal(t, exp.Date, read("dLDateVar"), "dLDateVar") + // assert.Equal(t, exp.Dt, read("dtLDateTimeVar"), "dtLDateTimeVar") + assert.Equal(t, exp.String, read("sStringVar"), "sStringVar") } // ----------------------------------------------------------------------- @@ -239,33 +304,35 @@ var staticSeedCases = []struct { func TestStaticSeed(t *testing.T) { client := newClient(t) + const fb = "Main.fbTypeTest" + for _, tc := range staticSeedCases { tc := tc t.Run(tc.name, func(t *testing.T) { // Write the driving seed over ADS - require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", tc.seed), "WriteValue seed") + require.NoError(t, client.WriteValue(plcPort, fb+".nSeed", tc.seed), "WriteValue seed") // Wait for at least 5 PLC cycles (50 ms @ 10 ms cycle) time.Sleep(50 * time.Millisecond) // --- struct_var (structural: whole struct in one read) --- - snapshotRaw, err := client.ReadValue(plcPort, "Main.test.struct_var") - require.NoError(t, err, "ReadValue Main.test.struct_var") + snapshotRaw, err := client.ReadValue(plcPort, fb+".stStructVar") + require.NoError(t, err, "ReadValue "+fb+".stStructVar") assertSnapshot(t, snapshotRaw, tc.seed) // --- 1-D int array --- - intArrRaw, err := client.ReadValue(plcPort, "Main.test.int_array") - require.NoError(t, err, "ReadValue Main.test.int_array") + intArrRaw, err := client.ReadValue(plcPort, fb+".aIntArray") + require.NoError(t, err, "ReadValue "+fb+".aIntArray") assertIntArray(t, intArrRaw, tc.seed) // --- 1-D dint array --- - dintArrRaw, err := client.ReadValue(plcPort, "Main.test.dint_array") - require.NoError(t, err, "ReadValue Main.test.dint_array") + dintArrRaw, err := client.ReadValue(plcPort, fb+".aDintArray") + require.NoError(t, err, "ReadValue "+fb+".aDintArray") assertDintArray(t, dintArrRaw, tc.seed) // --- 2-D int array --- - arr2DRaw, err := client.ReadValue(plcPort, "Main.test.array_2d") - require.NoError(t, err, "ReadValue Main.test.array_2d") + arr2DRaw, err := client.ReadValue(plcPort, fb+".aIntArray2d") + require.NoError(t, err, "ReadValue "+fb+".aIntArray2d") assert2DArray(t, arr2DRaw, tc.seed) }) } @@ -273,30 +340,31 @@ func TestStaticSeed(t *testing.T) { // ----------------------------------------------------------------------- // Read access-path coverage — verifies all three read patterns for one seed: -// 1. Flat FB vars — Main.test. (individual scalar reads) -// 2. Struct structural — Main.test.struct_var (whole struct in one call) -// 3. Struct linear — Main.test.struct_var. (individual field reads) +// 1. Flat FB vars — Main.fbTypeTest. (individual scalar reads) +// 2. Struct structural — Main.fbTypeTest.struct_var (whole struct in one call) +// 3. Struct linear — Main.fbTypeTest.struct_var. (individual field reads) // ----------------------------------------------------------------------- func TestReadAllAccessPaths(t *testing.T) { client := newClient(t) + const fb = "Main.fbTypeTest" const seed = uint32(100) - require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", seed), "write seed") + require.NoError(t, client.WriteValue(plcPort, fb+".nSeed", seed), "write seed") time.Sleep(50 * time.Millisecond) t.Run("flat_fb_vars", func(t *testing.T) { - assertLinear(t, client, "Main.test", seed) + assertLinear(t, client, "Main.fbTypeTest", seed) }) t.Run("struct_structural", func(t *testing.T) { - raw, err := client.ReadValue(plcPort, "Main.test.struct_var") - require.NoError(t, err, "ReadValue Main.test.struct_var") + raw, err := client.ReadValue(plcPort, fb+".stStructVar") + require.NoError(t, err, "ReadValue "+fb+".stStructVar") assertSnapshot(t, raw, seed) }) t.Run("struct_linear", func(t *testing.T) { - assertLinear(t, client, "Main.test.struct_var", seed) + assertLinear(t, client, fb+".stStructVar", seed) }) } @@ -306,16 +374,16 @@ func TestReadAllAccessPaths(t *testing.T) { func TestSubscription(t *testing.T) { client := newClient(t) - + const fb = "Main.fbTypeTest" // Put PLC into a known state: seed=0 - require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", uint32(0)), "reset seed") + require.NoError(t, client.WriteValue(plcPort, fb+".nSeed", uint32(0)), "reset seed") time.Sleep(50 * time.Millisecond) // Subscribe to the snapshot struct (on-change, checked every PLC cycle) notifCh := make(chan ads.SubscriptionData, 32) sub, err := client.SubscribeValue( plcPort, - "Main.test.struct_var", + fb+".stStructVar", func(data ads.SubscriptionData) { select { case notifCh <- data: @@ -327,7 +395,7 @@ func TestSubscription(t *testing.T) { SendOnChange: true, }, ) - require.NoError(t, err, "SubscribeValue Main.test.struct_var") + require.NoError(t, err, "SubscribeValue "+fb+".stStructVar") defer func() { _ = client.Unsubscribe(sub) }() // Drain the mandatory initial notification sent on subscribe @@ -343,7 +411,7 @@ func TestSubscription(t *testing.T) { for i := 0; i < wantNotifs; i++ { nextSeed := uint32(i + 1) - require.NoError(t, client.WriteValue(plcPort, "Main.test.seed", nextSeed), "write seed %d", nextSeed) + require.NoError(t, client.WriteValue(plcPort, fb+".nSeed", nextSeed), "write seed %d", nextSeed) deadline := time.After(5 * time.Second) for { @@ -352,7 +420,7 @@ func TestSubscription(t *testing.T) { m, ok := data.Value.(map[string]any) require.Truef(t, ok, "notification %d: value should be map[string]any, got %T", i, data.Value) - gotSeed, ok := m["seed"].(uint32) + gotSeed, ok := m["nSeed"].(uint32) require.Truef(t, ok, "notification %d: seed should be uint32", i) if gotSeed < nextSeed { @@ -373,11 +441,10 @@ func TestSubscription(t *testing.T) { // ----------------------------------------------------------------------- // Write coverage — exercises WriteValue for every PLC type via: -// 1. Flat MAIN-level vars — Main.write__var (atomic scalar writes) -// 2. Struct linear fields — Main.write_struct_var. -// 3. Struct structural — Main.write_struct_var (whole struct at once) [SKIP: not yet implemented] -// 4. FB control vars — Main.test.seed / auto_mode / auto_tick_interval -// 5. Arrays — Main.write_int_array / write_dint_array / write_2d_array +// 1. Flat MAIN-level vars — Main.fbWriteTest.Var (atomic scalar writes) +// 2. Struct linear fields — Main.fbWriteTest.stStructVar. +// 3. Struct structural — Main.fbWriteTest.stStructVar (whole struct at once) [SKIP: not yet implemented] +// 4. Arrays — Main.fbWriteTest.aIntArray / aDintArray / aIntArray2d // ----------------------------------------------------------------------- type writeCase struct { @@ -411,33 +478,38 @@ func runWriteCases(t *testing.T, client *ads.Client, cases []writeCase) { func TestWriteAllTypes(t *testing.T) { client := newClient(t) + const fb = "Main.fbWriteTest" + // ------------------------------------------------------------------ // 1. Flat MAIN-level vars — PLC never touches these // ------------------------------------------------------------------ t.Run("flat_main_vars", func(t *testing.T) { - const m = "Main" runWriteCases(t, client, []writeCase{ - {m + ".write_bool_var", true, eqCheck(true)}, - {m + ".write_bool_var", false, eqCheck(false)}, - {m + ".write_sint_var", int8(-99), eqCheck(int8(-99))}, - {m + ".write_usint_var", uint8(200), eqCheck(uint8(200))}, - {m + ".write_byte_var", uint8(0xFF), eqCheck(uint8(0xFF))}, - {m + ".write_int_var", int16(-32000), eqCheck(int16(-32000))}, - {m + ".write_uint_var", uint16(65000), eqCheck(uint16(65000))}, - {m + ".write_word_var", uint16(0xABCD), eqCheck(uint16(0xABCD))}, - {m + ".write_dint_var", int32(-2_000_000), eqCheck(int32(-2_000_000))}, - {m + ".write_udint_var", uint32(3_000_000), eqCheck(uint32(3_000_000))}, - {m + ".write_dword_var", uint32(0xDEADBEEF), eqCheck(uint32(0xDEADBEEF))}, - {m + ".write_lint_var", int64(-9_000_000_000), eqCheck(int64(-9_000_000_000))}, - {m + ".write_ulint_var", uint64(18_000_000_000), eqCheck(uint64(18_000_000_000))}, - {m + ".write_lword_var", uint64(0xCAFEBABEDEADBEEF), eqCheck(uint64(0xCAFEBABEDEADBEEF))}, - {m + ".write_real_var", float32(3.14), deltaCheck(float64(float32(3.14)), 1e-4)}, - {m + ".write_lreal_var", float64(2.718281828), deltaCheck(2.718281828, 1e-9)}, - {m + ".write_time_var", uint32(5000), eqCheck(uint32(5000))}, - {m + ".write_tod_var", uint32(3_600_000), eqCheck(uint32(3_600_000))}, - {m + ".write_date_var", uint32(1_000_000), eqCheck(uint32(1_000_000))}, - {m + ".write_dt_var", uint32(1_700_000_000), eqCheck(uint32(1_700_000_000))}, - {m + ".write_string_var", "hello ADS", eqCheck("hello ADS")}, + {fb + ".bBoolVar", true, eqCheck(true)}, + {fb + ".bBoolVar", false, eqCheck(false)}, + {fb + ".nSintVar", int8(-99), eqCheck(int8(-99))}, + {fb + ".nUsintVar", uint8(200), eqCheck(uint8(200))}, + {fb + ".nByteVar", uint8(0xFF), eqCheck(uint8(0xFF))}, + {fb + ".nIntVar", int16(-32000), eqCheck(int16(-32000))}, + {fb + ".nUintVar", uint16(65000), eqCheck(uint16(65000))}, + {fb + ".nWordVar", uint16(0xABCD), eqCheck(uint16(0xABCD))}, + {fb + ".nDintVar", int32(-2_000_000), eqCheck(int32(-2_000_000))}, + {fb + ".nUdintVar", uint32(3_000_000), eqCheck(uint32(3_000_000))}, + {fb + ".nDwordVar", uint32(0xDEADBEEF), eqCheck(uint32(0xDEADBEEF))}, + {fb + ".nLintVar", int64(-9_000_000_000), eqCheck(int64(-9_000_000_000))}, + {fb + ".nUlintVar", uint64(18_000_000_000), eqCheck(uint64(18_000_000_000))}, + {fb + ".nLwordVar", uint64(0xCAFEBABEDEADBEEF), eqCheck(uint64(0xCAFEBABEDEADBEEF))}, + {fb + ".fRealVar", float32(3.14), deltaCheck(float64(float32(3.14)), 1e-4)}, + {fb + ".fLrealVar", float64(2.718281828), deltaCheck(2.718281828, 1e-9)}, + {fb + ".tTimeVar", uint32(5000), eqCheck(uint32(5000))}, + {fb + ".tdTimeOfDayVar", uint32(3_600_000), eqCheck(uint32(3_600_000))}, + {fb + ".dDateVar", uint32(1_000_000), eqCheck(uint32(1_000_000))}, + {fb + ".dtDateTimeVar", uint32(1_700_000_000), eqCheck(uint32(1_700_000_000))}, + // {fb + ".tLTimeVar", uint64(5000), eqCheck(uint64(5000))}, + // {fb + ".tdLTimeOfDayVar", uint64(3_600_000), eqCheck(uint64(3_600_000))}, + // {fb + ".dLDateVar", uint64(1_000_000), eqCheck(uint64(1_000_000))}, + // {fb + ".dtLDateTimeVar", uint64(1_700_000_000), eqCheck(uint64(1_700_000_000))}, + {fb + ".sStringVar", "hello ADS", eqCheck("hello ADS")}, }) }) @@ -445,30 +517,34 @@ func TestWriteAllTypes(t *testing.T) { // 2. Struct fields — linear access, one field at a time // ------------------------------------------------------------------ t.Run("struct_linear", func(t *testing.T) { - const s = "Main.write_struct_var" + const s = fb + ".stStructVar" runWriteCases(t, client, []writeCase{ - {s + ".seed", uint32(77), eqCheck(uint32(77))}, - {s + ".bool_var", true, eqCheck(true)}, - {s + ".bool_var", false, eqCheck(false)}, - {s + ".sint_var", int8(-50), eqCheck(int8(-50))}, - {s + ".usint_var", uint8(150), eqCheck(uint8(150))}, - {s + ".byte_var", uint8(0xAB), eqCheck(uint8(0xAB))}, - {s + ".int_var", int16(-1000), eqCheck(int16(-1000))}, - {s + ".uint_var", uint16(1000), eqCheck(uint16(1000))}, - {s + ".word_var", uint16(0x1234), eqCheck(uint16(0x1234))}, - {s + ".dint_var", int32(-100_000), eqCheck(int32(-100_000))}, - {s + ".udint_var", uint32(100_000), eqCheck(uint32(100_000))}, - {s + ".dword_var", uint32(0x12345678), eqCheck(uint32(0x12345678))}, - {s + ".lint_var", int64(-1_000_000_000), eqCheck(int64(-1_000_000_000))}, - {s + ".ulint_var", uint64(1_000_000_000), eqCheck(uint64(1_000_000_000))}, - {s + ".lword_var", uint64(0xDEADBEEF12345678), eqCheck(uint64(0xDEADBEEF12345678))}, - {s + ".real_var", float32(1.5), deltaCheck(float64(float32(1.5)), 1e-4)}, - {s + ".lreal_var", float64(3.141592653589793), deltaCheck(3.141592653589793, 1e-9)}, - {s + ".time_var", uint32(2000), eqCheck(uint32(2000))}, - {s + ".tod_var", uint32(7_200_000), eqCheck(uint32(7_200_000))}, - {s + ".date_var", uint32(500_000), eqCheck(uint32(500_000))}, - {s + ".dt_var", uint32(1_600_000_000), eqCheck(uint32(1_600_000_000))}, - {s + ".string_var", "write test", eqCheck("write test")}, + {s + ".nSeed", uint32(77), eqCheck(uint32(77))}, + {s + ".bBoolVar", true, eqCheck(true)}, + {s + ".bBoolVar", false, eqCheck(false)}, + {s + ".nSintVar", int8(-50), eqCheck(int8(-50))}, + {s + ".nUsintVar", uint8(150), eqCheck(uint8(150))}, + {s + ".nByteVar", uint8(0xAB), eqCheck(uint8(0xAB))}, + {s + ".nIntVar", int16(-1000), eqCheck(int16(-1000))}, + {s + ".nUintVar", uint16(1000), eqCheck(uint16(1000))}, + {s + ".nWordVar", uint16(0x1234), eqCheck(uint16(0x1234))}, + {s + ".nDintVar", int32(-100_000), eqCheck(int32(-100_000))}, + {s + ".nUdintVar", uint32(100_000), eqCheck(uint32(100_000))}, + {s + ".nDwordVar", uint32(0x12345678), eqCheck(uint32(0x12345678))}, + {s + ".nLintVar", int64(-1_000_000_000), eqCheck(int64(-1_000_000_000))}, + {s + ".nUlintVar", uint64(1_000_000_000), eqCheck(uint64(1_000_000_000))}, + {s + ".nLwordVar", uint64(0xDEADBEEF12345678), eqCheck(uint64(0xDEADBEEF12345678))}, + {s + ".fRealVar", float32(1.5), deltaCheck(float64(float32(1.5)), 1e-4)}, + {s + ".fLrealVar", float64(3.141592653589793), deltaCheck(3.141592653589793, 1e-9)}, + {s + ".tTimeVar", uint32(2000), eqCheck(uint32(2000))}, + {s + ".tdTimeOfDayVar", uint32(7_200_000), eqCheck(uint32(7_200_000))}, + {s + ".dDateVar", uint32(500_000), eqCheck(uint32(500_000))}, + {s + ".dtDateTimeVar", uint32(1_600_000_000), eqCheck(uint32(1_600_000_000))}, + // {m + ".tLTimeVar", uint64(2000), eqCheck(uint64(2000))}, + // {m + ".tdLTimeOfDayVar", uint64(7_200_000), eqCheck(uint64(7_200_000))}, + // {m + ".dLDateVar", uint64(500_000), eqCheck(uint64(500_000))}, + // {m + ".dtLDateTimeVar", uint64(1_600_000_000), eqCheck(uint64(1_600_000_000))}, + {s + ".sStringVar", "write test", eqCheck("write test")}, }) }) @@ -478,33 +554,36 @@ func TestWriteAllTypes(t *testing.T) { // ------------------------------------------------------------------ t.Run("struct_structural", func(t *testing.T) { const seed = uint32(77) + exp := expectedValues(seed) m := map[string]any{ - "seed": exp.Seed, - "bool_var": exp.Bool, - "sint_var": exp.Sint, - "usint_var": exp.Usint, - "byte_var": exp.Byte_, - "int_var": exp.Int, - "uint_var": exp.Uint, - "word_var": exp.Word, - "dint_var": exp.Dint, - "udint_var": exp.Udint, - "dword_var": exp.Dword, - "lint_var": exp.Lint, - "ulint_var": exp.Ulint, - "lword_var": exp.Lword, - "real_var": exp.Real, - "lreal_var": exp.Lreal, - "time_var": exp.Time_, - "tod_var": exp.Tod, - "date_var": exp.Date, - "dt_var": exp.Dt, - "string_var": exp.String, + "nSeed": exp.Seed, + "bAutoMode": false, + "nAutoTickInterval": uint32(50), + "bBoolVar": exp.Bool, + "nSintVar": exp.Sint, + "nUsintVar": exp.Usint, + "nByteVar": exp.Byte_, + "nIntVar": exp.Int, + "nUintVar": exp.Uint, + "nWordVar": exp.Word, + "nDintVar": exp.Dint, + "nUdintVar": exp.Udint, + "nDwordVar": exp.Dword, + "nLintVar": exp.Lint, + "nUlintVar": exp.Ulint, + "nLwordVar": exp.Lword, + "fRealVar": exp.Real, + "fLrealVar": exp.Lreal, + "tTimeVar": exp.Time_, + "tdTimeOfDayVar": exp.Tod, + "dDateVar": exp.Date, + "dtDateTimeVar": exp.Dt, + "sStringVar": exp.String, } - require.NoError(t, client.WriteValue(plcPort, "Main.write_struct_var", m)) + require.NoError(t, client.WriteValue(plcPort, fb+".stStructVar", m)) time.Sleep(20 * time.Millisecond) - got, err := client.ReadValue(plcPort, "Main.write_struct_var") + got, err := client.ReadValue(plcPort, fb+".stStructVar") require.NoError(t, err) assertSnapshot(t, got, seed) }) @@ -513,17 +592,17 @@ func TestWriteAllTypes(t *testing.T) { // 4. FB control vars — public vars on the Deterministic FB instance // ------------------------------------------------------------------ t.Run("fb_control_vars", func(t *testing.T) { - const fb = "Main.test" + const controlFB = "Main.fbTypeTest" runWriteCases(t, client, []writeCase{ - {fb + ".seed", uint32(999), eqCheck(uint32(999))}, - {fb + ".auto_mode", true, eqCheck(true)}, - {fb + ".auto_mode", false, eqCheck(false)}, - {fb + ".auto_tick_interval", uint32(123), eqCheck(uint32(123))}, + {controlFB + ".nSeed", uint32(999), eqCheck(uint32(999))}, + {controlFB + ".bAutoMode", true, eqCheck(true)}, + {controlFB + ".bAutoMode", false, eqCheck(false)}, + {controlFB + ".nAutoTickInterval", uint32(123), eqCheck(uint32(123))}, }) // Restore stable state - require.NoError(t, client.WriteValue(plcPort, fb+".auto_mode", false), "restore auto_mode") - require.NoError(t, client.WriteValue(plcPort, fb+".seed", uint32(0)), "restore seed") - require.NoError(t, client.WriteValue(plcPort, fb+".auto_tick_interval", uint32(50)), "restore tick interval") + require.NoError(t, client.WriteValue(plcPort, controlFB+".bAutoMode", false), "restore auto_mode") + require.NoError(t, client.WriteValue(plcPort, controlFB+".nSeed", uint32(0)), "restore seed") + require.NoError(t, client.WriteValue(plcPort, controlFB+".nAutoTickInterval", uint32(50)), "restore tick interval") }) // ------------------------------------------------------------------ @@ -534,15 +613,15 @@ func TestWriteAllTypes(t *testing.T) { for i := range writeVal { writeVal[i] = int16(i * 10) } - require.NoError(t, client.WriteValue(plcPort, "Main.write_int_array", writeVal)) + require.NoError(t, client.WriteValue(plcPort, fb+".aIntArray", writeVal)) time.Sleep(20 * time.Millisecond) - got, err := client.ReadValue(plcPort, "Main.write_int_array") + got, err := client.ReadValue(plcPort, fb+".aIntArray") require.NoError(t, err) arr, ok := got.([]any) require.True(t, ok, "expected []any got %T", got) require.Len(t, arr, 10) for i, v := range arr { - assert.Equal(t, int16(i*10), v, "write_int_array[%d]", i) + assert.Equal(t, int16(i*10), v, "aIntArray[%d]", i) } }) @@ -551,15 +630,15 @@ func TestWriteAllTypes(t *testing.T) { for i := range writeVal { writeVal[i] = int32(i * 1000) } - require.NoError(t, client.WriteValue(plcPort, "Main.write_dint_array", writeVal)) + require.NoError(t, client.WriteValue(plcPort, fb+".aDintArray", writeVal)) time.Sleep(20 * time.Millisecond) - got, err := client.ReadValue(plcPort, "Main.write_dint_array") + got, err := client.ReadValue(plcPort, fb+".aDintArray") require.NoError(t, err) arr, ok := got.([]any) require.True(t, ok, "expected []any got %T", got) require.Len(t, arr, 10) for i, v := range arr { - assert.Equal(t, int32(i*1000), v, "write_dint_array[%d]", i) + assert.Equal(t, int32(i*1000), v, "aDintArray[%d]", i) } }) @@ -569,9 +648,9 @@ func TestWriteAllTypes(t *testing.T) { {4, 5, 6}, {7, 8, 9}, } - require.NoError(t, client.WriteValue(plcPort, "Main.write_2d_array", writeVal)) + require.NoError(t, client.WriteValue(plcPort, fb+".aIntArray2d", writeVal)) time.Sleep(20 * time.Millisecond) - got, err := client.ReadValue(plcPort, "Main.write_2d_array") + got, err := client.ReadValue(plcPort, fb+".aIntArray2d") require.NoError(t, err) outer, ok := got.([]any) require.True(t, ok, "expected []any got %T", got) @@ -581,7 +660,7 @@ func TestWriteAllTypes(t *testing.T) { require.True(t, ok) require.Len(t, inner, 3) for j, v := range inner { - assert.Equal(t, writeVal[i][j], v, "write_2d_array[%d][%d]", i, j) + assert.Equal(t, writeVal[i][j], v, "aIntArray2d[%d][%d]", i, j) } } }) @@ -590,16 +669,16 @@ func TestWriteAllTypes(t *testing.T) { // ----------------------------------------------------------------------- // Struct packing — the same four fields under pack_mode 0/2/4/8. // -// Field layout: b1 BOOL | d1 DWORD | b2 BOOL | lw1 LWORD +// Field layout: bBoolMember1 BOOL | nDwordMember DWORD | bBoolMember2 BOOL | nLwordMember LWORD // This layout causes the DWORD and LWORD to land at different byte offsets // under each pack mode, so the serializer must use subItem.Offset (as // reported by the PLC's ADS type info) rather than packing fields naively. // // Expected offsets per Beckhoff docs: -// pack_mode 0: b1=0 d1=1 b2=5 lw1=6 (total 14) -// pack_mode 2: b1=0 d1=2 b2=6 lw1=8 (total 16) -// pack_mode 4: b1=0 d1=4 b2=8 lw1=12 (total 20) -// pack_mode 8: b1=0 d1=4 b2=8 lw1=16 (total 24) +// pack_mode 0: bBoolMember1=0 nDwordMember=1 bBoolMember2=5 nLwordMember=6 (total 14) +// pack_mode 2: bBoolMember1=0 nDwordMember=2 bBoolMember2=6 nLwordMember=8 (total 16) +// pack_mode 4: bBoolMember1=0 nDwordMember=4 bBoolMember2=8 nLwordMember=12 (total 20) +// pack_mode 8: bBoolMember1=0 nDwordMember=4 bBoolMember2=8 nLwordMember=16 (total 24) // // Two-phase strategy to avoid circular validation: // @@ -619,25 +698,31 @@ func packExpected(seed uint32) (b1 bool, d1 uint32, b2 bool, lw1 uint64) { return seed%2 == 0, seed, seed%3 == 0, uint64(seed) * 3 } +var structTestFieldNames = struct{ b1, d1, b2, lw1 string }{ + "bBoolMember1", "nDwordMember", "bBoolMember2", "nLwordMember", +} + func assertPackStruct(t *testing.T, got any, seed uint32) { t.Helper() m, ok := got.(map[string]any) require.True(t, ok, "expected map[string]any got %T", got) b1, d1, b2, lw1 := packExpected(seed) - assert.Equal(t, b1, m["b1"], "b1") - assert.Equal(t, d1, m["d1"], "d1") - assert.Equal(t, b2, m["b2"], "b2") - assert.Equal(t, lw1, m["lw1"], "lw1") + assert.Equal(t, b1, m[structTestFieldNames.b1], structTestFieldNames.b1) + assert.Equal(t, d1, m[structTestFieldNames.d1], structTestFieldNames.d1) + assert.Equal(t, b2, m[structTestFieldNames.b2], structTestFieldNames.b2) + assert.Equal(t, lw1, m[structTestFieldNames.lw1], structTestFieldNames.lw1) } func TestStructPacking(t *testing.T) { client := newClient(t) + fbName := "Main.fbStructTest" + packPaths := []struct{ name, plcRead, writeTarget string }{ - {"pack_none", "Main.struct_tests.pack_none", "Main.pack_none"}, - {"pack_two", "Main.struct_tests.pack_two", "Main.pack_two"}, - {"pack_four", "Main.struct_tests.pack_four", "Main.pack_four"}, - {"pack_eight", "Main.struct_tests.pack_eight", "Main.pack_eight"}, + {"pack_none", fbName + ".stPackNone", fbName + ".stPackNoneWrite"}, + {"pack_two", fbName + ".stPackTwo", fbName + ".stPackTwoWrite"}, + {"pack_four", fbName + ".stPackFour", fbName + ".stPackFourWrite"}, + {"pack_eight", fbName + ".stPackEight", fbName + ".stPackEightWrite"}, } // ------------------------------------------------------------------ @@ -649,7 +734,7 @@ func TestStructPacking(t *testing.T) { for _, seed := range []uint32{0, 1, 2, 3, 6, 100, 0xFFFFFFFF} { seed := seed t.Run(fmt.Sprintf("seed_%d", seed), func(t *testing.T) { - require.NoError(t, client.WriteValue(plcPort, "Main.struct_tests.seed", seed)) + require.NoError(t, client.WriteValue(plcPort, fbName+".nSeed", seed)) time.Sleep(20 * time.Millisecond) for _, p := range packPaths { p := p @@ -670,7 +755,8 @@ func TestStructPacking(t *testing.T) { t.Run("write_then_linear_read", func(t *testing.T) { const seed = uint32(42) b1, d1, b2, lw1 := packExpected(seed) - val := map[string]any{"b1": b1, "d1": d1, "b2": b2, "lw1": lw1} + + val := map[string]any{structTestFieldNames.b1: b1, structTestFieldNames.d1: d1, structTestFieldNames.b2: b2, structTestFieldNames.lw1: lw1} for _, p := range packPaths { p := p @@ -678,21 +764,21 @@ func TestStructPacking(t *testing.T) { require.NoError(t, client.WriteValue(plcPort, p.writeTarget, val), "WriteValue %s", p.writeTarget) time.Sleep(20 * time.Millisecond) - gotB1, err := client.ReadValue(plcPort, p.writeTarget+".b1") + gotB1, err := client.ReadValue(plcPort, p.writeTarget+"."+structTestFieldNames.b1) require.NoError(t, err) - assert.Equal(t, b1, gotB1, "b1") + assert.Equal(t, b1, gotB1, structTestFieldNames.b1) - gotD1, err := client.ReadValue(plcPort, p.writeTarget+".d1") + gotD1, err := client.ReadValue(plcPort, p.writeTarget+"."+structTestFieldNames.d1) require.NoError(t, err) - assert.Equal(t, d1, gotD1, "d1") + assert.Equal(t, d1, gotD1, structTestFieldNames.d1) - gotB2, err := client.ReadValue(plcPort, p.writeTarget+".b2") + gotB2, err := client.ReadValue(plcPort, p.writeTarget+"."+structTestFieldNames.b2) require.NoError(t, err) - assert.Equal(t, b2, gotB2, "b2") + assert.Equal(t, b2, gotB2, structTestFieldNames.b2) - gotLw1, err := client.ReadValue(plcPort, p.writeTarget+".lw1") + gotLw1, err := client.ReadValue(plcPort, p.writeTarget+"."+structTestFieldNames.lw1) require.NoError(t, err) - assert.Equal(t, lw1, gotLw1, "lw1") + assert.Equal(t, lw1, gotLw1, structTestFieldNames.lw1) }) } }) @@ -700,8 +786,8 @@ func TestStructPacking(t *testing.T) { func TestSymbolAttributes(t *testing.T) { client := newClient(t) - sym, err := client.GetSymbol(plcPort, "Main.attribute_test") - require.NoError(t, err, "GetSymbol Main.attribute_test") + sym, err := client.GetSymbol(plcPort, "Main.fbAttributeTest") + require.NoError(t, err, "GetSymbol Main.fbAttributeTest") require.NotNil(t, sym) // Log diagnostic info to help debug attribute parsing in integration environment. @@ -716,7 +802,7 @@ func TestSymbolAttributes(t *testing.T) { } else { var found *adssymbol.AdsSymbol for i := range all { - if all[i].Name == "Main.attribute_test" { + if all[i].Name == "Main.fbAttributeTest" { found = &all[i] break } @@ -739,7 +825,7 @@ func TestSymbolAttributes(t *testing.T) { } // Expect one attribute: a flag-only attribute. - require.Len(t, sym.Attributes, 1, "expected 1 attribute on Main.attribute_test") + require.Len(t, sym.Attributes, 1, "expected 1 attribute on Main.fbAttributeTest") var foundCustom bool for _, a := range sym.Attributes { From cd60fe1553f907116269eeb51157f9c40bdf0ce9 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Tue, 12 May 2026 16:50:53 +1000 Subject: [PATCH 22/24] fix(serializer): support structs without PLC layout metadata --- pkg/ads/ads-serializer/serialize.go | 61 +++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/pkg/ads/ads-serializer/serialize.go b/pkg/ads/ads-serializer/serialize.go index bed7597..58a55cb 100644 --- a/pkg/ads/ads-serializer/serialize.go +++ b/pkg/ads/ads-serializer/serialize.go @@ -51,9 +51,16 @@ func Serialize(value any, dataType types.AdsDataType, isArrayItem ...bool) ([]by if !ok { return nil, fmt.Errorf("invalid type for struct: %T (expected map[string]any)", value) } - // Allocate the exact struct size reported by the PLC so that any - // alignment padding between fields is preserved as zero bytes. - result := make([]byte, dataType.Size) + + type serializedField struct { + name string + offset uint32 + data []byte + } + + serializedFields := make([]serializedField, 0, len(dataType.SubItems)) + hasExplicitOffsets := false + for _, subItem := range dataType.SubItems { subItemValue, exists := valMap[subItem.Name] if !exists { @@ -63,7 +70,53 @@ func Serialize(value any, dataType types.AdsDataType, isArrayItem ...bool) ([]by if err != nil { return nil, err } - copy(result[subItem.Offset:], subItemBuf) + serializedFields = append(serializedFields, serializedField{ + name: subItem.Name, + offset: subItem.Offset, + data: subItemBuf, + }) + if subItem.Offset != 0 { + hasExplicitOffsets = true + } + } + + // Preserve the old declaration-order behavior for synthetic struct + // definitions that do not include PLC layout metadata. + if !hasExplicitOffsets { + for _, field := range serializedFields { + buf.Write(field.data) + } + if dataType.Size == 0 { + return buf.Bytes(), nil + } + result := make([]byte, dataType.Size) + if len(buf.Bytes()) > len(result) { + return nil, fmt.Errorf("struct size %d too small for sequential fields", dataType.Size) + } + copy(result, buf.Bytes()) + return result, nil + } + + // When offsets are available, honor the PLC-reported layout so padding + // bytes remain zero and packed structs serialize correctly. + resultSize := int(dataType.Size) + if resultSize == 0 { + for _, field := range serializedFields { + end := int(field.offset) + len(field.data) + if end > resultSize { + resultSize = end + } + } + } + + result := make([]byte, resultSize) + for _, field := range serializedFields { + start := int(field.offset) + end := start + len(field.data) + if end > len(result) { + return nil, fmt.Errorf("struct size %d too small for field %s at offset %d", dataType.Size, field.name, field.offset) + } + copy(result[start:end], field.data) } return result, nil } From 63dc735cc9678d7bb22fec1053150ec52c99b998 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Tue, 12 May 2026 16:52:47 +1000 Subject: [PATCH 23/24] test(integration): wait for stable subscription snapshots --- test/integration/plc_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/plc_test.go b/test/integration/plc_test.go index 3b0ff75..aa94fcd 100644 --- a/test/integration/plc_test.go +++ b/test/integration/plc_test.go @@ -428,6 +428,15 @@ func TestSubscription(t *testing.T) { continue } + // The PLC updates stStructVar.nSeed before the derived fields, so a + // transitional notification can contain the next seed while the rest + // of the struct still reflects the previous cycle. The string field is + // assigned last, so once it matches the target seed the snapshot is + // stable for full-struct assertions. + if gotString, ok := m["sStringVar"].(string); !ok || gotString != expectedValues(gotSeed).String { + continue + } + require.Equalf(t, nextSeed, gotSeed, "notification %d: unexpected seed", i) assertSnapshot(t, data.Value, gotSeed) From e50b645c07cf50586125cc5015e8d4bd40adc2b1 Mon Sep 17 00:00:00 2001 From: piratecarrot <39475419+piratecarrot@users.noreply.github.com> Date: Fri, 12 Jun 2026 17:01:37 +1000 Subject: [PATCH 24/24] fix: UploadInfo requests 24 bytes from SymbolUploadInfo2 (0xF00F) Requesting only 8 bytes caused 'Parameter size not correct' (ADS 0x710) on any PLC using the SymbolUploadInfo2 index group, which always returns a 24-byte response. The CLI tool already used 24; align client_symbols.go to match. Fixes FindLogRingSymbol / FindSymbolByAttribute on real hardware. --- ads-go.code-workspace | 7 +++++++ pkg/ads/client_symbols.go | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 ads-go.code-workspace diff --git a/ads-go.code-workspace b/ads-go.code-workspace new file mode 100644 index 0000000..362d7c2 --- /dev/null +++ b/ads-go.code-workspace @@ -0,0 +1,7 @@ +{ + "folders": [ + { + "path": "." + } + ] +} \ No newline at end of file diff --git a/pkg/ads/client_symbols.go b/pkg/ads/client_symbols.go index b08be1b..b63da42 100644 --- a/pkg/ads/client_symbols.go +++ b/pkg/ads/client_symbols.go @@ -35,9 +35,11 @@ func (c *Client) GetSymbol(port uint16, path string) (*adssymbol.AdsSymbol, erro } // UploadInfo returns the number of symbols and the total byte size of the -// symbol table blob, read from ADS index group 0xF00C (SymbolUploadInfo). +// symbol table blob, read from ADS index group 0xF00F (SymbolUploadInfo2). +// The response is 24 bytes: symCount(4), symSize(4), dataTypeCount(4), +// dataTypeSize(4), extendedDataSize(4), padding(4). func (c *Client) UploadInfo(port uint16) (symCount uint32, symSize uint32, err error) { - data, err := c.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUploadInfo2), 0, 8) + data, err := c.ReadRaw(port, uint32(types.ADSReservedIndexGroupSymbolUploadInfo2), 0, 24) if err != nil { return 0, 0, fmt.Errorf("UploadInfo: %w", err) }