From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to compile PDA application for USB-6008

Hi,

we are trying to develop an application for a Toshiba e750 PDA (Pocket PC 2003) to work with a USB-6008. The setup is LabView 8.5.1, PDA module 8.5.1, DAQmx Base 3.1, MS embedded VC++ 4.0 (upgraded to SP 3). The application compiles successfully when target is set to Win32 and produces a working executable that interacts correctly with the USB-6008. 

On the other hand, when we attempt to compile for the PDA, we get an error message (unable to create an executable). The builds directory contains the following error log:

 

 Convert_1DWfm_to_DDT.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
DAQmx_Control_Task.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
DAQmx_Create_AI_Channel__sub_.c
DAQmx_Create_Channel__AI_Voltage_Basic_.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
DAQmx_Read__Analog_1D_Wfm_NChan_NSamp_.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
DAQmx_Stop_Task.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
DAQmx_Timing__Sample_Clock_.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
proba2.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
sub_Waveform_Array_To_Dynamic.c
c:\documents and settings\natali\local settings\temp\~tmp45647\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
Generating Code...
Compiling...
_lvcepda80ARMtemp_.cpp
Generating Code...
Compiling...
lvCEPDAMain.c
.\LVForms.h(35) : fatal error C1070: mismatched #if/#endif pair in file 'c:\documents and settings\natali\local settings\temp\~tmp45647\lvforms.h'
Generating Code...
LINK : error LNK2001: unresolved external symbol WinMainCRTStartup
myProj.exe : fatal error LNK1120: 1 unresolved externals

 

At the same time, any sample applications with no data acquisition interface (NI samples or written by us) compile and deploy to the PDA correctly.

If someone could suggest a possible reason for this problem, your help would be very much appreciated.

 

Thank you in advance

 

Sasha Buzko

 

0 Kudos
Message 1 of 14
(3,739 Views)
Have you tried the example programs in the Example Finder? Also, is it possible for you to post your code over here so we can see what exactly is going on?
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 14
(3,725 Views)
Message Edité par chilly charly le 01-03-2009 07:10 AM
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 3 of 14
(3,715 Views)

Hi Adnan, thank you for the reply.

Yes, the examples run just fine on the PDA (compiled, deployed and run from the PDA). But all of the working examples (both from NI and our own variations) do not include data acquisition components. In other words, as soon as we add the USB-6008 data acquisition element, the code stops compiling. It seems as if some required component is missing.. On the other hand, the original error message didn't really provide much information..

 

As a test case, we have put together a very simple VI application that fails to deploy to a PDA in our setup. When deployed to a Win32 target, it works correctly. Is there a way for you (or someone at NI) to run it and check whether it's the code or the configuration issue? I attached the VI and project files in case someone could take a look at it.

Thank you in advance for any suggestions.

 

Best regards,

 

Sasha

 

0 Kudos
Message 4 of 14
(3,700 Views)

Well, I got your mistake already. You need to use DAQmx Base when working with PDA. As a rule, DAQmx Base must be used when using an operating system not supported by NI-DAQmx such as Linux, MacOS X, Windows Mobile etc. You can download DAQmx base over here. Have a look at the functions palette in the block diagram, and you will notice that only functions that are supported by the Mobile module will show up over there. You won't be able to find DAQmx VIs over here but will find DAQmx Base VIs. After you have installed DAQmx Base, go through the examples that are located at:

C:\Program Files\National Instruments\LabVIEW 8.6\examples\daqmxbase\PDA

 

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 5 of 14
(3,694 Views)

Thanks, Adnan Z.

DAQmx Base 3.1 is installed (as I mentioned in the original post), but the sample application was pretty much imported from the Win32-targeted project. We started working with some DAQmx Base examples, and they compile and deploy to the PDA correctly.

At this point, the problem is that we don't seem to have the complete execution environment on the PDA - when the deployed app is executed it produces an error message about not being able to find required libraries or there are problems with path.

 

The PDA is a Toshiba e750 with Pocket PC 2003. DAQmx Base installation utility lists the following as installed on the PDA:

NI DAQmx Base 3.1

NI DAQmx Base 3.1 USB device support

NI Shared Variable Support

NI-VISA 4.3

 

Can you tell whether something is missing? When an example (such as Acq&Graph Voltag-Int Clk) is deployed and run with default DAQmx Task Name (ai finite buffered), everything works. But when the task is changed to MyVoltageInTask or MyDigitalInTask, the PDA fails to run with the above error message.

 

Thank you in advance for any suggestions

 

Best regards,

 

Sasha

 

 

0 Kudos
Message 6 of 14
(3,659 Views)

LabVIEW PDA is definitely different from the LabVIEW environment itself; you cannot expect to have your Windows LabVIEW application to just work on the PDA. As I mentioned before, if you have a look at the functions palette on the block diagram, you will notice lots of functions missing. That's because they won't work in the PDA environemnt and are, thus, not supported.

 

As I mentioned before, there is a difference between DAQmx Base and DAQmx. So, be careful when using tasks and VIs. What kind of tasks are MyVoltageInTask and MyDigitalInTask? Are they DAQmx or DAQmx base. If you want to create DAQmx Base tasks then you will need to use the DAQmx Base Task Configuration Utility. I would recommend that you go through the KB article:

Performing Handheld Measurements using LabVIEW Mobile and NI USB Data Acquisition Devices

 

and have a look at  Star->All Programs->National Instruments->NI-DAQmx Base->Documentation->NI-DAQmx Base Getting Started Guide (page 11)

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 7 of 14
(3,652 Views)

Hi Adnan Z,

that's precisely what we did, and we are past the compilation problems and incorrect components.

 

We used an example from the DAQmx Base distribution and tested it with our setup. It compiles and is copied to the PDA, but can't run with the error message I gave in my last post. Under the circumstances, there is no chance that we are using standard Win32-oriented components. The error on the PDA now has nothing to do with compilation - the build on the development PC is successful and the file is deployed to the PDA.

The problem is somewhere in prerequisites installed (or missing) on the PDA.

 

As an example, I'm sending two apps - both trimmed down from a DAQmx Base PDA example. Both compile on the Win32, but only one can run on the PDA. The difference is the data acquisition component.

 

At this point, I guess, the problem boils down to "What's missing in the PDA environment that prevents this part of code from executing?" All that's currently installed on the PDA is in my previous post.

 

Thanks for any suggestions

 

Sasha

 

0 Kudos
Message 8 of 14
(3,642 Views)

Hi Sasha,

 

The one that's working doesn't have any code in it :). If you have followed all the steps that are mentioned in the DevZone article I linked above, then things should work fine. One quick observation: after setting up the task in DAQmx Base Configuration Utility, did you export the task list and place it in the Mobile Device File Synchronization folder? What happens if, instead of running a static task, you run a dynamic one? Does it still give you errors? I apologize but I don't have a PDA or a USB daq device to test this, hence, the questions. Let me know.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 9 of 14
(3,621 Views)

Sasha,

 

You can find a little more information on the static and dynamic tasks that Adnan Z referred to in these KnowledgeBase articles:

 

Differences Between Static and Dynamic Tasks in NI-DAQmx Base

 

What is the Difference Between a Static and Dynamic Example for NI-DAQmx Base?

 

 

0 Kudos
Message 10 of 14
(3,599 Views)