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 <[email protected]> 
Gesendet: Donnerstag, 11. Februar 2021 12:06
An: [email protected]
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 <[email protected]> 
Gesendet: Donnerstag, 11. Februar 2021 11:35
An: [email protected]
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 <[email protected]> 
Gesendet: Donnerstag, 11. Februar 2021 11:19
An: [email protected]
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/[email protected]/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


Reply via email to