Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulator required during software development

I am developing an application, in VC++, that will collect data using a PCMCIA NIDAQ card. To enable development on a desktop pc, that does not have any hardare attached, I would like a hardware simulator. Is there anything available?

Regards,
Dave.
0 Kudos
Message 1 of 4
(3,407 Views)
Hi Simbo,

I haven't been able to verify the following procedure on a laptop, but I have verified the procedure with another desktop pc.

To simulate the PCMCIA hardware, if you are using traditional DAQ, is to setup your laptop with DAQ and the hardware installed on to a network. On the laptop go to Start menu >> Programs >> National Instruments >> NI-DAQ >> Remote Device Access Server

Then on the development machine, open MAX and right-click on "devices and interfaces" then "Create New". In the next window select Traditional NI-DAQ device >> RDA/Ethernet device then click on Finish.

In the next window enter either the IP address or the name of the laptop. Choose the device you want to simulate. Give it the same device number that it has on the laptop.


You can now configure the device and that will also configure the device in the laptop.

Bear in mind that when you want to access the DAQ card, you will need to make sure the laptop is turned on and connected to the network.

You can't simulate hardware with DAQmx, and you can't use Remote Device Access in DAQmx either.

Hope this helps

Regards
James
Applications Engineer
NI UK
0 Kudos
Message 2 of 4
(3,407 Views)
Thanks. It works well.

I had an initial problem with incompatible versions on client/server, but once I sorted that the machines connected without problems.

Dave.
0 Kudos
Message 3 of 4
(3,407 Views)
The two machines are talking - ie I can vary the input voltage on the laptop and see the change in MAX's test panel.

However, when calling the NIDAQ functions from my VC++ program I get the error -10403, even in my simple test app.
The following works OK

u32 nNIDAQType;
m_nNILastStatus = Get_DAQ_Device_Info(1, ND_DEVICE_TYPE_CODE, &nNIDAQType);


This line returns the -10403 error.

i16 iReading = 0;
m_nNILastStatus = AI_Read(1, 0, 1, &iReading);


Any ideas on how to fix this?

Regards,
Dave.
0 Kudos
Message 4 of 4
(3,407 Views)