Comments (4)
Hi there,
I have not tested with S7-200 but as far as I know S7-200 has no rack/slot . Therefore just put 0/0. Try to take some test and let me know the result. If you have any improvement please feel free to sharing. Cheers, R
from gos7.
Okay, so i just found my TSAP in a capture of the COTP Protocol. I currently just hardcoded it into the source to fix my issue. If i am able to resolve/understand the root cause i will provide you with more information and maybe an pull request.
Could you share some Sample Code for setting Merkers? My Endgoal is to set Merker 2.4 to 1. Some Code would really help me out because im now just fiddling through the function AGWriteMB to find this out.
// TCPClient
handler := gos7.NewTCPClientHandler(tcpDevice, rack, slot)
handler.Timeout = 10 * time.Second
handler.IdleTimeout = 10 * time.Second
handler.Logger = log.New(os.Stdout, "tcp: ", log.LstdFlags)
// Connect manually so that multiple requests are handled in one connection session
handler.Connect()
defer handler.Close()
//init client
client := gos7.NewClient(handler)
// read Variable
start := 2
log.Println("merkerTest Merker as Byte:", byte(start))
fmt.Println()
size := 1
buffer := make([]byte, 255)
//AGWriteMB to Parameters
err := client.AGWriteMB(start, size, buffer)
log.Println("write mb error:", err)
//AGWriteMB(start int, size int, buffer []byte) (err error)
Any examples would be from great interest. Thanks for you help.
from gos7.
The S7-200 is answering to both CPU and PLC Status Functions with an Error Code (CPU : Function not available 0). So these functions are maybe not supported on this model
from gos7.
So the S7-200 wants a bit instead of a byte for their data. In your libary the datatype is hardcoded to byte. Maybe we could introduce a parameter for AGWriteMB to change the Type.
For my problems, i just hardcoded everything to use bits. Thanks for your work
from gos7.
Related Issues (20)
- SetStringAt() address error
- Add support of wstring in helper
- About Set/Get PLC time function HOT 2
- read addresses from wincc HOT 1
- Can I connect to Profinet using this library? HOT 2
- how to detect a timed-out connection, and avoid panic on `client.AGReadDB` HOT 1
- Problems with cross compiling for darwin (serial.go) HOT 3
- About write bit to DB address HOT 4
- Where to start? HOT 1
- How do I connect to s7-1200?There are no tracks and slots in s7-1200,errors:invalid pdu received or invalid buffer passed to send/receive '19' HOT 4
- When will support PPI? HOT 3
- BUG : gos7.SetWStringAt()
- Request support for some S7-200 HOT 2
- Best practice: Should change 'dbIndex' in 'DBX' format HOT 1
- When playing the example from the README, I get the following error: "binary.Write failed: binary.Write: invalid type int" and "ISO : Invalid Buffer passed to Send/Receive'19'" HOT 7
- How connect s7 smart200 plc HOT 5
- Query Bits in AGMultiRead
- Suggestion:support PLC Type Select HOT 1
- Suggestion: ADD new func "NewTCPClientHandlerWithConnectType" to change connectionType when allocates a new TCPClientHandler HOT 2
- panic when use PLCStop()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gos7.