Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem building real time exe for VXworks

Hi All,

I have been developing an application on a crio 9012 and I have really liked all the stuff I can do with the gear BUT there have been heaps of weird little obscure problems.

The thing that's killing me right now is that I have the application working perfectly as a VI but the moment I create an executable, it does not work the same way.

There are some sub vis that get called which handle sending strings to a serial LCD panel and it looks like that there are a couple which aren't being picked up during the compile.

I can see that the controller is doing the things I expect but the display is not showing some of the screens.

I thought this may have been some weird race condition problem to do with the relative running speed of the rt exe compared to the VI but I have gone through and made sure this is not the case.

When I try to debug the rt exe, I get the following scary messages instructing me to get in touch with NI. These pics are attached.

HELP!!! I have completed the work and just need to build a $#@!#$!@ executable.  It's well past midnight and I'm fighting the tool and not solving a technical challenge (sorry just needed to vent a little.)

Any help would be greatly appreciated.  Should of course mention that I am running 8.5 and all the latest RIO and real time bits.



cheers!
Peter

0 Kudos
Message 1 of 7
(4,524 Views)

A related post.

Are you currently using any property nodes as described in the above post?

It may be helpful to post screenshots of your subVIs.

David_B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,509 Views)
G'day David,
 
 thanks for your response.  Funny I did not find that very useful post you pointed out when I searched with the codes.
 
 I was using property nodes but only to get at the value of the objects as I had read an article that (as I understood it) indicated that this was a more immediate way to modify the value.  In any case, after my last post, I thought I would go back and remove all of these and replace them with local variables.  The result was that the compiled application now runs as expected.  Yipee!
 
 The 8.5 help for real time for the VX works target explains more about how property nodes may not work.  I was lulled into a sense of it working because it compiled and ran on the target when run as a VI.  Clearly when it was turned into an exe, the property nodes just never came back.  I had initially suspected that vis weren't being picked up by the compile process bcos of the error msg that came back when trying to debug the exe. 
 
 Sooooo... the good news is that the application now works as far as I can tell.  The bad news is that I still can't connect to the target to do any debugging of the executable as this fails with the same set of scarry messages.  Not a huge issue for this application as it is fairly simple but really puts into perspective the risk of going down the path of developing a control system for a small machine where the ability to debug the running system is mandatory.
 
 It would be good if vis and methods that weren't supported would just throw errors when they were under the real time target in the project tree.  I'd still like to know the best way to resolve the online debugging issue as this did not seem to be resolved in the referenced post either.
 
 Thanks again for your response David.  I am happy to provide the code for comment but I can't post it as there are confidentiality agreements in place around the work.
 
Best regards
Peter
0 Kudos
Message 3 of 7
(4,507 Views)

Hi Peter,

What error message are you getting when trying to debug you executable?  Are you creating debugable exes and the going to Operate > Debug Shared Libary or Exe?

Regards,

Basset Hound

0 Kudos
Message 4 of 7
(4,502 Views)

Hi Basset Hound,

 The error message turn up when I try to connect to the rtexe that is running on the cRIO.  The dip switches on the crio are all off and I boot up the cRIO independently.  When building the rtexe I have enabled debugging.

 I go to 'Operate->Debug Application or Shared Library', put in the IP address of the controller and click on connect after selecting the highlighted exe name.  A dialog pops up and a list of names of files starts running by and at some stage, a message box pops up with the message

'Compiler Error. Report this error to National Instruments Tech Support.  IUse::GenCode missing VI in kInitPass'.  This message pops up about 3 or 4 times before the 1st diaog starts moving again and after a while says failed to connect.    The messages that come up after the 1st msg above are things like 'copy cvt refnum, csrc=0x3' after the msg to contact NI tech support.

 As you can see, the 1st message made me suspect that a vi was not being picked up and this was why some display was not coming up when expected.  This turned out to be due to the use of properties rather than any missing vis.

 I also tried to use the 'always include' option in the exe builder to ensure that all relevant vis made it in but this did not work either.

cheers!

Peter

0 Kudos
Message 5 of 7
(4,496 Views)

Hi Peter,

What version of LVRT are you currently using?  Any chance you can post the Application that can reproduce the issue?

Regards,

Basset Hound

0 Kudos
Message 6 of 7
(4,464 Views)
Hi Guys,
 
 sorry for the late response,  was on site for a few days.    I am using labview rt 8.5.  I have in the meantime completely reinstalled windows and labview and tried a new build of the exe.  The problem still occurs.
 
 I can confirm that I can use a much simpler host program vi and build an executable which I can debug.  This simpler host program links to the same FPGA code so it would seem that the problem is purely a host issue.  I can't post the code because there are confidentiality issues with the development. 
 
 I will pursue the issue with NI here locally and will try and post any updates that turn up.  Thanks for trying to help!
 
Best regards all,
Peter
0 Kudos
Message 7 of 7
(4,413 Views)