Python Signal

If it is a robot,i can use robot.SignalMapIn.input(100) to get signal Value.I want to know how to get a signal from a port. But that component isnot a robot .

Hello hechuan,

If I am understanding your question then you should be able to access the component and its input signal tree without having to rely on a robot controller. I have not tested a system on that port but I would just use:

comp = getComponent()
signalTreeIn = comp.findBehaviour(“Input”) # Name of signal Tree inputs

then if you have a signal there should be an element in that port. otherwise you have a blank

I may be wrong or may have misunderstood what you are trying to do

Hello,

I think I have the same issue.
I have a robot with output 100 and output 10.
image
In my python script I want to use those signals form those ports.
So i tried to get those with:
output10 = robot.SignalMapOut.output(10)
output100 = robot.SignalMapOut.output(100)

Well: AttributeError: ‘NoneType’ object has no attribute ‘SignalMapOut’

I imported:
from vcScript import *
from vcBehaviour import *
from vcBooleanSignalMap import *

jbte, what do you mean with signal tree input?
Don’t you need a for loop to get all of the signals form the robot?

What do I miss?
If you have a hint, that would be very helpful

Thank you
DrBro