PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Building EXE with real-time PXIe-8100

I'm trying to build a standalone executable.  I'm using Building and Deploying a Stand-Alone Real-Time Application (Real-Time Module) as a guide.  I've built my host exe and rtmain.rtexe and using MAX to install the rtexe on the PXIe.  When I turn on my PXIe the rtexe automatically runs.  I can start my host application and connect to the PXIe; however, I can't seem to get any additional functionality as I do when I'm in the labview project explorer tree, I can only see the system health information from the PXI (CPU usuage, memory etc) so I know it's communicating. For instance I try to get a list of devicenet devices and nothing happens.  I've included a picture of my rtmain.rtexe, the commandUI writer/listener.VI, and my DNET get list.  All of these VIs, are basically standarded VIs.  

If anyone could provide some insight what I might be missing that would be greatly appreciated.

 

Thank you.

0 Kudos
Message 1 of 7
(3,696 Views)

Hi,

 

Does the program work when you run it from the normal LabVIEW dev environment (i.e. not as a built exe)?

Are you in fact using NI-DNET, or are you using the newer NI-Industrial Communications for DeviceNet hardware/software?

Does any of your PC-host to RT-PXI-target-program communication work, or is the lack of communication isolated to only DeviceNet functionality?

 

Answering these will help narrow down the cause of the issue.

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 2 of 7
(3,670 Views)

Hi,

Thanks for the response.  Everything works in the normal labVIEW developement environment.  I am using the NI Industrial DNET communications for DeviceNET version 2.3 I believe.  When I'm in the normal dev environment I have one single VI on the RT target that I start basically my RTMain.VI.  Then I have one VI on my host computer (HostMain.VI) I start and that's all I have to do.  I can connect to the target and I have multiple communcation happening with the target (analog input signals from CDGs, thermocouple readings, and DNET all works fine).   

When I build my exe and run my application, I can establish a connection with the target, and I know it does because I have a health monitoring loop that looks at CPU usage etc and then is updating.  But it doesn't seem like anything else gets communicated down to the target when I request to read analog signals or query DeviceNET devices.

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

How are you querying the DeviceNET devices?  Are you using certain drivers?

 

-Bear

Regards,

Ben Johnson
ʕง•ᴥ•ʔง
0 Kudos
Message 4 of 7
(3,650 Views)

So, the issue only occurs once you've built the program into EXEs. To further refine:

 

Does the behavior only occur when one part of the program is an EXE (e.g.only RTEXE on controller vs only .EXE on host PC)? This will help determine which sub-program the issue is coming from.

 

How are you reading data (CPU info, AI, DeviceNet) back from the RT controller- PSPs, network streams, custom communication, etc?

 

 

 

Andrew T.
"His job is to shed light, and not to master" - Robert Hunter
0 Kudos
Message 5 of 7
(3,642 Views)

Right the issue only occurs when I build the program into an exe.

 

The host exe seems to be working correctly.  It seem like the rtexe is the one not responsive. (Seems this way)

 

I create a network stream writer/reader endpoints to communicate to my rtexe statemachine.  That network stream is established once I press connect on the host side (I have an indicator show True when endpoints are estabilished).  

RT status (CPU,memory usuage etc) is being sent by network published shared variables to my host.(RTsendstatus.jpg) and Host reads it (HostreadStatus.jpg).  This seems to be working.

 

When I click get DNET devices on my host it has to send a message through network streams down to the target to tell my statemachine on the target to get "DNET Getlist" which should execute the subVI in that case that gets a list of all DNET address connected and then sends that list via network streams back up to my host. (GetDNETList_fromTarget.jpg)  Note: RT loop - UI commands.vi established the network stream that sends all commands back and forth between target and host. 

 

Seems to me like the message handling loop (GetDNETList_fromTarget.jpg) is not getting the messages sent from the host.

 

My analog signals are also being sent via Network published variables.

 

Hope this helps.

Thanks!

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

Hello,

It looks like the code can run normally without DeviceNet part. However there is no details about the VI of DeviceNet in GetDNETList_fromTarget.jpg.  Could you please show us the details of the subVI?

And some questions:

1. If messages were generated from host?

2. If only EXE will lead to this phenomenon?

Thanks!

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