Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO: Unflatten from string into lvclass not working in deployment

Hello,

 

I am working on a problem for some hours now and I need some help.

 

I am using a cRIO-9022. I need to do some tasks, and I created a couple of classes which contain the parameters and the methods. They contain using dynamic dispatch VIs. I have an array of these classes (all derived from a parent class) which is my "configuration". I am using "flatten to string" and saving those file on disk. "Unflatten from string" is working fine. These file is created on a LV WIndows Application.

 

I need to use this file on my cRIO: Unflatten from string, and then work with the array of my classes. When running the cRIO Main VI it's working fine. But when building the application and deploying it as startup, it's not working. I am getting:

 

Error 1403 occurred at Unflatten From String in Gantry CommEngine.vi->RT Main.vi

Possible reason(s):

LabVIEW:  Attempted to read flattened data of a LabVIEW class. The data is corrupt. LabVIEW could not interpret the data as any valid flattened LabVIEW class.

 

What I tried so far:

- Added the whole lvlib containing the classes and also every single class to "Source files / always included".

- Created constants of the array (containing the classes) to the VI (forcing LV to include the classes?)

- Loaded the file from cRIOs flash and also by shared variable

 

What else can I do?

 

Thanks a lot for support!

0 Kudos
Message 1 of 3
(4,587 Views)

I tried to reproduce the matter, but couldn't. 

I attached my example to the post. 

What it does:

It creates a class with only a string a bool and a number. This class oblect is saved to C:/somename.xml. The number is a random number.

In the second case the same file is read and the number broadcasted to a variable.

It worked quite fine building it as a startupexe.

Nothing else was necessary. Does it work for you?

 

0 Kudos
Message 2 of 3
(4,484 Views)

Hi, thanks for your reply.

 

At the moment I can't make any tests about that, I don't have access to the hardware.

My workaround so far uses only clusters instead of classes, and I am not sure if I will have the time so test this issue again. 😕

0 Kudos
Message 3 of 3
(4,479 Views)