11-29-2020 11:52 PM
Hi, I want to transfer data from cRIO to another device using the Ethernet port. The CompactRIO model I have is NI cRIO-9063, which does not have the PoE ports.
For example, I want to send data from cRIO to another cRIO using Ethernet port. Is it possible I could do so using TCP protocol? Are there any example VIs?
Thank you.
11-30-2020
12:30 AM
- last edited on
06-13-2024
05:31 PM
by
Content Cleaner
You can try using web services. But this won't work for streaming data. Here's a description:
Also, if you add both devices to one project, you can use network shared variables:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2CMCAY&l=ru-RU
11-30-2020
11:06 PM
- last edited on
06-13-2024
05:32 PM
by
Content Cleaner
There is also an article describing the basic principles of working with TCP in LV.
Also you can use Python scripts.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x4PSCAY&l
https://pymotw.com/2/socket/tcp.html
12-02-2020 12:37 AM
Hi. So I was able to send data from one computer to the other via Ethernet using UDP Example VI (not TCP).
However, the only way I could send the data was if I set the address in "UDP Write Block" from the Sender VI to 255.255.255.255.
If I set the Ethernet IPv4 Address that I set on the other computer, it would not work.
I have attached an image where it seems I'm getting the problem in acquiring the right address.
Please advise. Thank you!
12-02-2020 02:37 AM
UPDATE:
I was also able to send UDP data via Ethernet by auto-configuring its IP Address and using that IP Address. However, the same approach was not possible through TCP.
12-02-2020 03:30 AM
Launched examples for UDP. On one device, I send messages via UDP. On another device, I receive these messages. In my case, a similar example works.
Have you tried pinging between your devices?
Run->Cmd-> ping <IP_your_device>
Do you find the device you need when you enter the command "arp -a"? (Run->Cmd-> arp -a)
Are your devices on a shared subnet?
12-02-2020 03:43 AM
Can you send and receive data over UDP using a terminal? For example Hercules:
12-02-2020 03:55 AM
Hi karlin.
I was able to use UDP. And yes, I tested it with Hercules and it worked there as well, however, when I tried to replicate the same process via TCP, I was unable to send data. However, I believe this would work fine for my project. i.e sending data from cRIO to another device.
I will test that soon. Thank you for your help!
12-02-2020 05:20 AM - edited 12-02-2020 05:38 AM
Hmm. When I make a remote device (in my case TPC2230) a server everything works.
But when I make my PC a server, it becomes impossible to establish a connection.
Perhaps this is the fault of the firewall settings. All ports on my PC are closed for incoming connections.
P.S. Please call me "Egor"
12-02-2020 05:34 AM
Hi Egor,
Same here. I even disabled the firewalls at both ends, the problem persisted.