LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To more specific class works on IDE but not on EXE, on target machine

Hi to everybody,

I need support on a strange situation, where a code running on Labview development Interface performs correctly and when running on a target machine, being installed from an installer created by the above IDE, does not work.

Below the situation on the development environment:

Works.png

IDE works_probe values.png

The refnums correspond to a ring and a multicolumn objects of program's window where I have to load information collected from an ini file.

The problem is: when I build the exe and the installer and I install the program on a new machine, after the To more specific Class, I get a  Not a Refnum output whithout the update of the content of the two controls, as for below images.

IDE does NOT work_probe values.png

Can anybody help me ? I do not understand why I have a program behavior on the development environent on my computer and a different one on a different machine. 

Thanks, Silvio

0 Kudos
Message 1 of 21
(375 Views)

@SPRD wrote:

Hi to everybody,

I need support on a strange situation, where a code running on Labview development Interface performs correctly and when running on a target machine, being installed from an installer created by the above IDE, does not work.

Below the situation on the development environment:

Can anybody help me ? I do not understand why I have a program behavior on the development environent on my computer and a different one on a different machine. 

Thanks, Silvio


Probably RT is your problem? Where your application is deployed and running?

Screenshot 2024-10-09 14.54.11.png

Message 2 of 21
(363 Views)

Dear Andrey, first of all thanks for Your prompt reply.

Application is deployed and running on a windows desktop machine.

The scereenshot refers to a debug performed from my development machine, using the LV remote debugging tools on our network.

Thanks, Silvio 

 

0 Kudos
Message 3 of 21
(357 Views)

What happens in the SubVI 'Find Ctrl From Label 2' ?

What error do you get from that SubVI?

Or do you already have an upstream error on the error wire?

Message 4 of 21
(350 Views)

@SPRD wrote:

Dear Andrey, first of all thanks for Your prompt reply.

Application is deployed and running on a windows desktop machine.

The scereenshot refers to a debug performed from my development machine, using the LV remote debugging tools on our network.

Thanks, Silvio 

 


And when debug mode is not used - same issue or this happened in debug only?

Here is something similar - https://forums.ni.com/t5/LabVIEW/Refnum-Not-Available-For-RT/td-p/986781

 

Message 5 of 21
(343 Views)

Dear Andrey,

SubVI 'Find Ctrl From Label 2': its function is to parse from an array of controls that refers to program's interface, based on the search label I assign (CMDsets = ring control and ListaComandi=MulticolumnListBox) so thatI can select the reference that correspond to the control that I need to manipulate.

FindControlFromLabel2.png

From these VI, in the development environment I do not get errors, while when software is deployed on the target machine, data are not read / represented from the controls of the user interface.

On target machine - after Your indication - I tested an installer version with some error indicators and found that I get into the not working VI with already an Error 1057, that comes from the VI that reads the ini file.

There I have a similar approach, as below image.

ReadIniCMDfile content.png

I get to probe 36 with no errors, but after To more specific class VI I get the error.

The fact is that that Comandi is a ring and I cannot undertand the error 1057 condition.

Interface.png

 Thanks, Silvio

0 Kudos
Message 6 of 21
(321 Views)

@SPRD wrote:

ReadIniCMDfile content.png

I get to probe 36 with no errors, but after To more specific class VI I get the error.

The fact is that that Comandi is a ring and I cannot undertand the error 1057 condition.

 

 Thanks, Silvio


It is hard to impossible to tell what is going on when looking at truncated images of code. 

If you have no error before 'To More Specific Class' node and error 1057 after the node then what reference is going into the node (the source of the reference is not in the image)? The error indicates that the reference can't be casted to a ring reference. You say 'Comandi' is a ring but is it really its reference going to 'To More Specific Class'? What does probe 34 show?

 

 

 

 

Message 7 of 21
(300 Views)

Dear UliB,

below all the VI

ReadIniCMDfile content.png

Probe 34: if I run the program on development machine, the result si as for below image

Probes on development  ReadIniCMD.png

Probes Values DevMachine ReadCMDiniFile.png

Thnks

 

0 Kudos
Message 8 of 21
(284 Views)

@SPRD wrote:

Dear Andrey,

SubVI 'Find Ctrl From Label 2': its function is to parse from an array of controls that refers to program's interface, based on the search label I assign (CMDsets = ring control and ListaComandi=MulticolumnListBox) so thatI can select the reference that correspond to the control that I need to manipulate.

FindControlFromLabel2.png

From these VI, in the development environment I do not get errors,...

 

The fact is that that Comandi is a ring and I cannot undertand the error 1057 condition.

 

 Thanks, Silvio


You have written the classic 0 iteration For Loop bug.   Put the Error on a Shift Register so that the upstream error 1057 (which is causing the autoindexed string array input to be empty) is passed out of the loop.  

 

The conditionally enabled index out is not quite correct.  It really be replaced with a Last Value, show the Loop's conditional terminal and stop the loop on error or TRUE from the comparison instead.  Also, you probably should just autoindex the array of refnums and return the same last value so that the refnum out is the default "Not a Refnum" when the for loop does not execute at all.  Currently you return ctl reference index 0 and the default error ( no error) whenever the string array is empty. This is bad! And can cause all sorts of problems downstream...but you already know that it causes trouble 😏

 

THEN go figure out why your file isn't being read correctly in the executable. 


"Should be" isn't "Is" -Jay
Message 9 of 21
(268 Views)

Hi Jay,

thanks for Your feedback, but the point is that ini file is correctly read, not all of the data are correctly displayed as this refnum is not handled properly by the exe, while in the development evironment everything works well.

I previously indexed directly the array of refnums, with a lastvalue + conditional behavior to have the needed refnum referring to the controls where I need to show the data.

With the problems I found, I changed the parsing VI as I read that this approach can give problems.

I get refnum without errors out of the parser, but when i fetch it to a "To a more specific class" VI, than rises the 1057 error.

On development environment I see that the ControlRef is referring to the correct control, so I do not unerstand why I get the error.

Silvio 

0 Kudos
Message 10 of 21
(189 Views)