LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Linked Network Actor url problem

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:

1.png

2.png

 

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:

M_S__0-1627648709328.png

2) ToHost.vi override to receive message "Ping" from cRIO:

M_S__1-1627649072544.png

I would be grateful for any tips how to solve this problem.

 

 

 

0 Kudos
Message 1 of 7
(1,032 Views)

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

0 Kudos
Message 2 of 7
(996 Views)

I wonder if the issue is still there

0 Kudos
Message 3 of 7
(961 Views)

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:

M_S__0-1629707105444.png

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:

M_S__1-1629707276938.png

I have both Writer and Reader connected.

0 Kudos
Message 4 of 7
(950 Views)

Is this "workaround" ok for now?

0 Kudos
Message 5 of 7
(923 Views)

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.

 

 

 

0 Kudos
Message 6 of 7
(909 Views)

Can you please have a look at this article explaining everything about network streams and best practices

0 Kudos
Message 7 of 7
(898 Views)