Documentation and examples on URCap API - Profinet specific

Welcome to the pain of interacting with the registers via the API. The short answer: You’re not missing anything, it’s just not possible. There’s nothing in the API that exposes the general purpose registers that allows you to write to them. The closest you can get is being able to SEE NAMED registers (but again, you can’t actually write their values). The API does allow access to the physical IO on the controller, so if you just need to turn something On or Off, this is an option.

However, you CAN send URScript commands as the result of pressing a button in Java, which can, for the most part, accomplish what you want. Just be aware that it’s pretty laggy, especially if you try to send multiple commands quickly. See my post here for links to the classes and how to use them:

I know you say you’re not talking about using the script writer to append script lines, but really this is what you need to do (just using the above classes to do it strictly from interacting with the Java UI, not needing to run a robot program). Then you just have your button send and execute script like “set_output_integer_registerX(myValue)” and your Profinet master just looks at that particular register,

1 Like