gos7 icon indicating copy to clipboard operation
gos7 copied to clipboard

Implementation of Siemens S7 protocol in golang

Results 17 gos7 issues
Sort by recently updated
recently updated
newest added

Hi Robinson, I have a small question, as I would like to write a bit to PLC , but seems that I didn't see any function which is able to...

Hi Robinson. When I'm use gos7.SetWStringAt() to obtain the byte array written to PLC, it will always write several more bytes, For example, when I want to write the string...

Hi , I want to know when will support ppi communication?

Hi Robinson, PGClock**Write** (implement **Get**PLCDateTime) , is it a mistake between 2 functions? //implement GetPLCDateTime func (mb *client) PGClockWrite() (datetime time.Time, err error) //implement SetPLCDateTime func (mb *client) PGClockRead(datetime time.Time)...

This PR adds the ability to read input and output signals with the method client.Read. You can use the following variable represenations. Input: I/E[startbyte].[bit] (e.g. I1.1, E2.1) Output: Q/A[startbyte].[bit] (e.g....

func (mb *client) readArea(area int, dbNumber int, start int, amount int, wordLen int, buffer []byte) (err error) { 。。。 var response *ProtocolDataUnit response, sendError := mb.send(&request) err = sendError 。。。...

func (mb *client) send(request *ProtocolDataUnit) (response *ProtocolDataUnit, err error) { dataResponse, err := mb.transporter.Send(request.Data) if err = mb.packager.Verify(request.Data, dataResponse); err != nil { return } if dataResponse == nil ||...

the SetCharsAt function does not work. I tried converting from string to a byte slice, writing to plc, and reading back using GetCharsAt. The values return all zeros. ive found...

Test CPU: SIEMENS S7-1211 Test Block: DB1 ```go 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...

test CPU: SIMENS S7-1211 ```go func TestGetCpuInfo(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();...