Closed runtimevic closed 7 months ago
Could you elaborate more? What do you mean?
Hi @jisotalo , with blocks custom and with node.js and with your library to be able to read and write the variables, and create programs... https://blockly-demo.appspot.com/static/demos/code/index.html
Hello @jisotalo , @Hopperpop: If anyone wants to collaborate, you are invited.
Hi @jisotalo , @Hopperpop ,
How can I send the connection without address, only with port? thanks Víctor.
Hello happy new year 2024: @jisotalo , @Hopperpop How can I send the connection without address, only with port 301? thanks Víctor.
Sorry @runtimevic , I don't understand what do you mean? If you leave localAmsNetId
empty (or set is as localhost
) it will connect to the local runtime.
Hi @jisotalo
not work ...
Setup 4 - Connect to the localhost (PLC and client on the same machine)
targetAmsNetId = "localhost"
port = 301
click create symbols , view image
Hi, I finally solved it:
static async connect(address:string, port:number){
Environment.client = new ads.Client({
targetAmsNetId: address, //or 'localhost'
targetAdsPort: port,
bareClient: true, //NOTE
})
The problem is that with default settings it checks if the PLC runtime is running. As you don't have one configured it causes errors.
For that you have the allowHalfOpen
and bareClient
option. As i understood allowHalfOpen
will still checks if it finds the system manager to see if the system is in RUN or CONFIG. With bareClient is also skips that check. (@jisotalo Correct me if I'm wrong.)
Hi @Hopperpop , @jisotalo I solved it this way by adding the bareClient parameter:
If you like the project and want to collaborate in the organization, you are welcome...
Good that you solved it!
@Hopperpop you absolutely right, thanks again!
Hi, idea suggestion: does this exist ads-client with blockly? I think it would be very good, thanks.