07-30-2021 07:50 AM
Hi,
I am creating application based on Actor Framework. To communicate with cRIO I have implemented Linked Network Actor based on this example:
https://forums.ni.com/t5/Actor-Framework-Documents/Actor-Framework-on-CompactRIO-and-Other-RT-Target...
I did everything like it was there, still I am receiving these errors:
I have attached my Linked Component. This is common actor used on both Host and Target. To receive message I am creating override for ToHost.vi or ToTarget.vi depends where it will be implemented. Above that there is some screens:
1) Pre Launch Init in child class:
2) ToHost.vi override to receive message "Ping" from cRIO:
I would be grateful for any tips how to solve this problem.
08-02-2021 06:34 AM
Ok, I have found problem. Target was trying to send data before connection was estabilished. Right now this error is not showing and if both Host and Target runs on local host everything is all right
Problem is that this program still doesn't work if target runs on cRIO. Indicators on host shows that there is problem with reader. So identical code is running on localhost but not on cRIO target.
cRIO 9038
08-18-2021 04:40 AM
I wonder if the issue is still there
08-23-2021 03:30 AM
I had a break from this but I am back now. For now I have estabilished connection with cRIO - both Writer and Reader are green. Problem was in Linked Networ Actor:
This is how Connect.vi automatically takes URL adres. But when you have more than one network on your computer this function will probably take wrong IP and this was creating problems. When I set IP to static and then in code:
I have both Writer and Reader connected.
09-13-2021 07:57 AM
Is this "workaround" ok for now?
09-27-2021 06:14 AM
Yes, It's working properly right now. With 1 additional change: I don't know why, but cRIO has problems when stream communication is started from it. But I have fixed that by adding Target Type to determine if code is performed on PC or cRIO.
Find attached my library with this changes.
10-05-2021 07:01 AM
Can you please have a look at this article explaining everything about network streams and best practices