Read current value of a output port

Hello,
is it possible to read the current value of a output port for an if-statement?
To reference an input port, I use the format IN[portnumber].

For an ouput port, I tried the format OUT[portnumber] but it doesn’t work.
Also the condition with a connected boolean signal behavior does not seem to work either.

grafik

As far as I know you cannot refer to output port in the expression.

Like a hot knife through butter, a statement handler is your friend since it gives you a lot of control. With output ports… if they are not connected to external signal, the port stays false. When a port is connected to external signal, internally a signal is created for the port.

Test - Statement Handler for Output Condition.vcmx (879.4 KB)

You can reference component properties in an expression for the If condition in ‘robot statement’ and it would not throw error if underscore was in the property name. If the property is grouped in tab, it should be referenced with tab name immediately followed by two semi-colons and then immediately followed by property name, e.g. Beer;;AsahiLager

For your use case, is it a must to check the output? And is there a specific robot language or PLC language you are referencing, for example $OUT[] for output monitoring?

Thanks for the quick response.

I will try it with the statement handler first!

I’am trying a virtual commissioning of a production cell with an ABB-Robot.
For communication between the robot and the PLC, I created the required DI/DO’s as boolean signal behavior and then connected them to the corresponding ports of the boolean map using a Python script.
This works fine for a SetBinaryOutput statement in the program editor.
My problem: In the original robot program, however, I also have to query the digital output in an if statement.

I also thought about only using a boolean property for this task, so I can reference the property in an expression for the if statement but also set the value with the AssignVariable statement.

In this case my question is:
Is there a difference between pairing a boolean property and a boolean signal behavoir with the corresponding ports of the PLC?

Another question:
Is it possible to create a wait statement that is evaluating more then one digital input? Is there some work around?
I have to do something like this:
WaitUntil digInput1==False OR digInput2==True

Please excuse my bad English.

Hi Max,

I made this kind of a WaitStatement and I shared it now on the forum. So check this add-on WaitStatement for robot programming

WaitStatement understands inputs, outputs and component properties but it doesn’t support single boolean signal behaviours. If you know python API you can possibly extend it to support boolean signal behaviours.

-k