We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test CPU: SIEMENS S7-1211 Test Block: DB1
func TestGetBlockInfo(t *testing.T) { handler := gos7.NewTCPClientHandler("192.168.1.3", 0, 1) handler.Timeout = 5 * time.Second handler.IdleTimeout = 5 * time.Second defer handler.Close() if err := handler.Connect(); err == nil { client := gos7.NewClient(handler) info, err := client.GetAgBlockInfo(65, 1) t.Log(err) t.Logf("BlkType: %v", info.BlkType) t.Logf("BlkNumber: %v", info.BlkNumber) t.Logf("BlkLang: %v", info.BlkLang) t.Logf("BlkFlags: %v", info.BlkFlags) t.Logf("MC7Size: %v", info.MC7Size) t.Logf("LoadSize: %v", info.LoadSize) t.Logf("LocalData: %v", info.LocalData) t.Logf("SBBLength: %v", info.SBBLength) t.Logf("CheckSum: %v", info.CheckSum) t.Logf("Version: %v", info.Version) t.Logf("CodeDate: %v", info.CodeDate) t.Logf("IntfDate: %v", info.IntfDate) t.Logf("Author: %v", info.Author) t.Logf("Family: %v", info.Family) t.Logf("Header: %v", info.Header) } else { t.Fatal(err) } }
return
=== RUN TestGetBlockInfo --- PASS: TestGetBlockInfo (0.09s) plc_test.go:35: CPU : Function not available plc_test.go:36: BlkType: 0 plc_test.go:37: BlkNumber: 0 plc_test.go:38: BlkLang: 0 plc_test.go:39: BlkFlags: 0 plc_test.go:40: MC7Size: 0 plc_test.go:41: LoadSize: 0 plc_test.go:42: LocalData: 0 plc_test.go:43: SBBLength: 0 plc_test.go:44: CheckSum: 0 plc_test.go:45: Version: 0 plc_test.go:46: CodeDate: plc_test.go:47: IntfDate: plc_test.go:48: Author: plc_test.go:49: Family: plc_test.go:50: Header: PASS
The text was updated successfully, but these errors were encountered:
PLC: s7-1511 same error
bi, err := client.GetAgBlockInfo(blockFC, 1) if err != nil { fmt.Println(err) }
out CPU : Function not available
CPU : Function not available
Sorry, something went wrong.
No branches or pull requests
Test CPU: SIEMENS S7-1211
Test Block: DB1
return
The text was updated successfully, but these errors were encountered: