Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1634 being thrown on RT Executable?!?

Okay, I've been trying to figure out why i can use AF with LNA when the code is running interactively but not when I build an RT executable.

Here's the problem: Error code 1634 is being caught by Handle Error. Now I've looked at the code and can see that the conditional disable is grayed out, so there should be no way this error is thrown. A capture of the Hypervisor Console window shows a contradiction. In fact the error is being thrown by the Actor.vi, what gives?

Here's a screen shot of the console windows and of the Actor.vi, Also, the boolean to show the Front panel is false.

ConsoleWindow.png

Actor_vi.png

Brian G. Shea
Certified LabVIEW Architect
0 Kudos
Message 1 of 7
(4,366 Views)

Here is my experience with using the LNA and going to EXE/RTEXE.

You need to make sure that your target that is going to receive a message from the LNA has the message in memory. When running from the Dev environment the classes can be loaded dynamically at runtime. EXEs can not load classes from disk.

To solve this you need to have a copy of the message class in the EXE. I override Pre Launch Init (Actor Core or another method would work too) and put all of the class constants for messages that a particular actor needs.

From an architecture standpoint I have a method that I like from Actors that need to use an LNA. I create a parent class and dynamic dispatch methods that are abstact in that parent. I then create messages for those dynamic dispatch methods in the parent actor. I then create a child on the PC side and a child on the RT side. I override the methods in those children. One side passes the message on the the LNA. The other side implements the method.

For example:

Parent Actor has method "Change Setpoint" with a double as input. Abstact method with nothing in the block diagram other than something saying this is the abstract method. Conpane is wired. "Change Setpoint Msg" Message is created. Place the class contant for "Change Setpoint Msg" in Pre Launch Init for the Parent Actor.

Child on the PC overrides the "Change Setpoint" by taking the double and putting it in a fresh copy of "Change Setpoint Msg" and then that is sent to the LNA with the "Send Transmit Network Message" method.

LNA send the message to the RT.

Child on RT receives the message and calls its own override of "Change Setpoint". For instance takes the double and does a range check to make sure the value is valid and then writes the setpoint to a device.

Note: I have separate projects for the PC and the RT. Both projects have the Parent Actor in them. Having both projects open will lock the Parent Actor.

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

0 Kudos
Message 2 of 7
(3,561 Views)

While the above is still true, the 1634 error is thrown with the Show Front Panel boolean set to True. Double check all of your launch nested actor calls.

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

0 Kudos
Message 3 of 7
(3,561 Views)

I found the problem, i expected that the error would be ignored and that in an EXE format the front panel would not be launched. That is not the case, in fact, the error is enabled in EXE. I think that logic should be, if the boolean is true and in development mode a warning should be thrown letting the developer know that their code WILL FAIL when compiled.

I think the show front panel boolean needs to be remove from the next rev of AF. It's too easy to for new AF users to use that crutch without knowing the full impact of the bad decision they have made.

Also, thanks for the great summary on how to handle Actors and messages. I have been working with AF for well over 2 years and have a process to link RT and Windows via Actors and messages, while it is not the most elegant method, it works. As i create messages, i place the class constant on the BD of the actor core so that the message is always forced into memory. This saves me the hassle of trying to figure out why my messages won't unflatten once built into an EXE.

Also, I have modified the LNA so that it is transparent to the actor, it is the caller of the RT and also a child of the Host and it transers messages back and forth without the need for replacing Send Messages with Transmit Network Message. It just handles it.

Thanks Again!

Brian G. Shea
Certified LabVIEW Architect
0 Kudos
Message 4 of 7
(3,561 Views)

CaseyLamers1 wrote:

EXEs can not load classes from disk.

Not true; you can instantiate a class from disk using Get LV Class Defautl Value.vi

This doesn't help you much in the context of message transmission, though.

0 Kudos
Message 5 of 7
(3,561 Views)

BrianGShea@NTS wrote:

I think the show front panel boolean needs to be remove from the next rev of AF. It's too easy to for new AF users to use that crutch without knowing the full impact of the bad decision they have made.

We get complaints about this feature a lot.  It's a sufficiently useful debugging tool that I'd hate to see it go, however.

I do address this in the training material I'm developing, but that's rather limited distribution at the moment.

0 Kudos
Message 6 of 7
(3,561 Views)

You are correct. I use this when loading my plug-ins from source. I do know the parent class and its interface ahead of time though.

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

0 Kudos
Message 7 of 7
(3,561 Views)