You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Wolfgang Huse <wo...@nutanix.com> on 2021/02/11 09:16:55 UTC

Additional Drivers for GOLang ?

Hello,
as I try to integrate PLC4x into an Golang-Framework I would like to know when additional drivers like S7 or OPCUA will be available in GO ? Is there any timeline ?

For the meantime, anybody knows a good Modbus-Simulator for Mac or Docker?

Regards,
Wolfgang Huse

AW: Additional Drivers for GOLang ?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Wolfgang,

luckily this was a quick one ... Initially I had the DriverManager have all transports and drivers in it. But this would result in large binaries. So I changed things pretty early that you need to manually register transports and drivers you want to use. 

Unfortunately then I didn't know that if you create a pipe and there's no consumer listening on the other side, that the writing to the pipe blocks untill there's a consumer. In this case the thread was blocked and the consumer could never be setup. I changed things and the example a bit ... now it's "working on my machine" (TM) ;-) ... thanks for reporting the first ever PLC4Go bug ;-)

If you update, you should find a changed example and this should work (given you adjust the connection url and the address string)

Chris



-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de> 
Gesendet: Donnerstag, 11. Februar 2021 12:06
An: dev@plc4x.apache.org
Betreff: AW: Additional Drivers for GOLang ?

Hi Wolfgang,

as you reported your problem was occuring while executing the hello-world-read example, I can unfortunately confirm this error happeining for me too. I'll look into it.

Chris


-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de> 
Gesendet: Donnerstag, 11. Februar 2021 11:35
An: dev@plc4x.apache.org
Betreff: AW: Additional Drivers for GOLang ?

Hi Wolfgang,

for modbus the default transport is "tcp" so the ":tcp" part of the connection string is redundant but I like to use it for the sake of clarity.

Same with the unit-identifier ... 

Would you be able to share your project with me ... then I could have a look.

Chris


-----Ursprüngliche Nachricht-----
Von: Wolfgang Huse <wo...@nutanix.com> 
Gesendet: Donnerstag, 11. Februar 2021 11:19
An: dev@plc4x.apache.org
Betreff: AW: Additional Drivers for GOLang ?

Thanks for the information regarding next planed steps on Go-Support.

I am on the list since early 2020 and I am using plc4x already successfully in some of my Demo-Environments.

Modbus-Simulator is up and running, now I have some issues with the first connection:

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
github.com/apache/plc4x/plc4go/pkg/plc4go.PlcDriverManger.GetConnection(0xc000090180, 0xc0000901b0, 0x1106625, 0x2e, 0x10f57a0)
                /Users/wolfgang.huse/go/pkg/mod/github.com/apache/plc4x/plc4go@v0.0.0-20210210165858-4e51c34c4cfe/pkg/plc4go/driverManager.go:130 +0x6aa
main.main()
                /Users/wolfgang.huse/Documents/Projects/go-plc4x/firststeps/plc4go_read.go:29 +0xb7 exit status 2

Seems that maybe the connection-string is malformed ?
Found different syntaxes in the provided Documentation and Demo-Code like:
modbus://192.168.23.30?unit-identifier=1
modbus:tcp://192.168.23.30

But none of them are working..
Actual I try to run the examples/read/hello_world_plc4go_read.go


Mit freundlichen Grüßen - With kind regards

Wolfgang Huse



AW: Additional Drivers for GOLang ?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Wolfgang,

as you reported your problem was occuring while executing the hello-world-read example, I can unfortunately confirm this error happeining for me too. I'll look into it.

Chris


-----Ursprüngliche Nachricht-----
Von: Christofer Dutz <ch...@c-ware.de> 
Gesendet: Donnerstag, 11. Februar 2021 11:35
An: dev@plc4x.apache.org
Betreff: AW: Additional Drivers for GOLang ?

Hi Wolfgang,

for modbus the default transport is "tcp" so the ":tcp" part of the connection string is redundant but I like to use it for the sake of clarity.

Same with the unit-identifier ... 

Would you be able to share your project with me ... then I could have a look.

Chris


-----Ursprüngliche Nachricht-----
Von: Wolfgang Huse <wo...@nutanix.com> 
Gesendet: Donnerstag, 11. Februar 2021 11:19
An: dev@plc4x.apache.org
Betreff: AW: Additional Drivers for GOLang ?

Thanks for the information regarding next planed steps on Go-Support.

I am on the list since early 2020 and I am using plc4x already successfully in some of my Demo-Environments.

Modbus-Simulator is up and running, now I have some issues with the first connection:

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
github.com/apache/plc4x/plc4go/pkg/plc4go.PlcDriverManger.GetConnection(0xc000090180, 0xc0000901b0, 0x1106625, 0x2e, 0x10f57a0)
                /Users/wolfgang.huse/go/pkg/mod/github.com/apache/plc4x/plc4go@v0.0.0-20210210165858-4e51c34c4cfe/pkg/plc4go/driverManager.go:130 +0x6aa
main.main()
                /Users/wolfgang.huse/Documents/Projects/go-plc4x/firststeps/plc4go_read.go:29 +0xb7 exit status 2

Seems that maybe the connection-string is malformed ?
Found different syntaxes in the provided Documentation and Demo-Code like:
modbus://192.168.23.30?unit-identifier=1
modbus:tcp://192.168.23.30

But none of them are working..
Actual I try to run the examples/read/hello_world_plc4go_read.go


Mit freundlichen Grüßen - With kind regards

Wolfgang Huse



AW: Additional Drivers for GOLang ?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Wolfgang,

for modbus the default transport is "tcp" so the ":tcp" part of the connection string is redundant but I like to use it for the sake of clarity.

Same with the unit-identifier ... 

Would you be able to share your project with me ... then I could have a look.

Chris


-----Ursprüngliche Nachricht-----
Von: Wolfgang Huse <wo...@nutanix.com> 
Gesendet: Donnerstag, 11. Februar 2021 11:19
An: dev@plc4x.apache.org
Betreff: AW: Additional Drivers for GOLang ?

Thanks for the information regarding next planed steps on Go-Support.

I am on the list since early 2020 and I am using plc4x already successfully in some of my Demo-Environments.

Modbus-Simulator is up and running, now I have some issues with the first connection:

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
github.com/apache/plc4x/plc4go/pkg/plc4go.PlcDriverManger.GetConnection(0xc000090180, 0xc0000901b0, 0x1106625, 0x2e, 0x10f57a0)
                /Users/wolfgang.huse/go/pkg/mod/github.com/apache/plc4x/plc4go@v0.0.0-20210210165858-4e51c34c4cfe/pkg/plc4go/driverManager.go:130 +0x6aa
main.main()
                /Users/wolfgang.huse/Documents/Projects/go-plc4x/firststeps/plc4go_read.go:29 +0xb7 exit status 2

Seems that maybe the connection-string is malformed ?
Found different syntaxes in the provided Documentation and Demo-Code like:
modbus://192.168.23.30?unit-identifier=1
modbus:tcp://192.168.23.30

But none of them are working..
Actual I try to run the examples/read/hello_world_plc4go_read.go


Mit freundlichen Grüßen - With kind regards

Wolfgang Huse



AW: Additional Drivers for GOLang ?

Posted by Wolfgang Huse <wo...@nutanix.com>.
Thanks for the information regarding next planed steps on Go-Support…

I am on the list since early 2020 and I am using plc4x already successfully in some of my Demo-Environments…

Modbus-Simulator is up and running, now I have some issues with the first connection:

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
github.com/apache/plc4x/plc4go/pkg/plc4go.PlcDriverManger.GetConnection(0xc000090180, 0xc0000901b0, 0x1106625, 0x2e, 0x10f57a0)
                /Users/wolfgang.huse/go/pkg/mod/github.com/apache/plc4x/plc4go@v0.0.0-20210210165858-4e51c34c4cfe/pkg/plc4go/driverManager.go:130 +0x6aa
main.main()
                /Users/wolfgang.huse/Documents/Projects/go-plc4x/firststeps/plc4go_read.go:29 +0xb7
exit status 2

Seems that maybe the connection-string is malformed ?
Found different syntaxes in the provided Documentation and Demo-Code like:
modbus://192.168.23.30?unit-identifier=1
modbus:tcp://192.168.23.30

But none of them are working….
Actual I try to run the examples/read/hello_world_plc4go_read.go


Mit freundlichen Grüßen – With kind regards

Wolfgang Huse



AW: Additional Drivers for GOLang ?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Wolfgang,

also from my side a warm welcome.
As I'm currently the only one worling on the go drivers, all I can tell you that it's our goal to have all drivers on all platforms. But with the limited resources we have, this might take a while. Of course, if there is a need for something companies definitely can speed up things by supporting the project by either actively contributing or by supporting the existing contributors with paid gigs. 

But generally I would expect S7 to be one oft he next drivers to come to Go. OPC-UA is a special case currently as we use the Eclipse Milo driver for that. So this driver is actually not portabe at the moment. There are some folks in the PLC4X community currently working on this, but I have not ETA for this for you right now.

Regarding Modbus Simulators: I always use ModbusPal in my trainings (http://modbuspal.sourceforge.net/) ... It's pure Java and free.

Chris

-----Ursprüngliche Nachricht-----
Von: Lukas Ott <ot...@gmail.com> 
Gesendet: Donnerstag, 11. Februar 2021 10:32
An: dev@plc4x.apache.org
Betreff: Re: Additional Drivers for GOLang ?

Hello Wolfgang,

First of all welcome to the list :-).

We indeed want to bring other drivers to GO. Just one mail before we were looking for developers who are willing to do that :-) so feel free to start developing. We are happy to help.
So concrete timeline no - roadmap yes - priority yes - ressources not yet -

For the Modbus-Simulator
I personally like: https://www.openplcproject.com/

here is a Docker based Modbus simulator:
https://github.com/NModbus/NModbus.DeviceSimulator

Regards,
otluk


Am Do., 11. Feb. 2021 um 10:17 Uhr schrieb Wolfgang Huse <
wolfgang.huse@nutanix.com>:

> Hello,
> as I try to integrate PLC4x into an Golang-Framework I would like to 
> know when additional drivers like S7 or OPCUA will be available in GO 
> ? Is there any timeline ?
>
> For the meantime, anybody knows a good Modbus-Simulator for Mac or Docker?
>
> Regards,
> Wolfgang Huse
>

Re: Additional Drivers for GOLang ?

Posted by Lukas Ott <ot...@gmail.com>.
Hello Wolfgang,

First of all welcome to the list :-).

We indeed want to bring other drivers to GO. Just one mail before we were
looking for developers who are willing to do that :-) so feel free to start
developing. We are happy to help.
So concrete timeline no - roadmap yes - priority yes - ressources not yet -

For the Modbus-Simulator
I personally like: https://www.openplcproject.com/

here is a Docker based Modbus simulator:
https://github.com/NModbus/NModbus.DeviceSimulator

Regards,
otluk


Am Do., 11. Feb. 2021 um 10:17 Uhr schrieb Wolfgang Huse <
wolfgang.huse@nutanix.com>:

> Hello,
> as I try to integrate PLC4x into an Golang-Framework I would like to know
> when additional drivers like S7 or OPCUA will be available in GO ? Is there
> any timeline ?
>
> For the meantime, anybody knows a good Modbus-Simulator for Mac or Docker?
>
> Regards,
> Wolfgang Huse
>