I'm trying to communicate between a LabVIEW code ( a code is running on myRIO device ) and a python code. Though, I'm not getting any error after running the both programs but unable to communicate.
The myRIO device is connected via a USB. I'm using myRIO's ethernet IP-addres ( 172.22.11.2 ) to .bind()
and the device's IP for the connected ethernet ( 172.22.11.1 ) to .connect()
. I'm binding on the publisher side and connecting on subscriber side.
Do I need to choose a particular port for this communication?
I also tried communicating through wireless network but it's still not working.
Any suggestion will be much appreciated.
Do I need to choose a particular port for this communication?
While there is an option on the .bind()
-method side to let the system choose one,
a_port_selected_at_random = aSocket.bind_to_random_port( 'tcp://*',
min_port = 9001,
max_port = 9099,
max_tries = 100
)
there will be a need to "tell" the .connect()
-method side, which port to try to use in the respective transport-class specifier
.connect( "tcp://{0:}:{1:}".format( <_use_this_ip_address_>,
<_use_this_port#_>
)
)
No, not any particular ones. If there is an API specification published, it is wise to follow it, not experimenting without paying any respect to the defined and published methods of work. That is quite enough.