Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Developing a driver written in VS2005 C using a MAX simulated harware.

Solved!
Go to solution

Goal: driver development in c, using VS2005.

Equipment: MAX and simulated hardware:

            NI cDAQ-9188

                        NI 9425

                        NI 9476

 

Hello everybody,

 

Due to several reasons I cannot access real hardware. So I try to use MAX with a simulated hardware for developing a driver for NI hardware.

MAX is working fine with test panels for the simulated hardware.

Simple I/O is running also well with my driver. As far as “well” means that there is no error message starting a task, creating a channel and doing some read/write action.

I got the feeling that I cannot really access the simulated hardware with my driver: If I activate a MAX test panel I cannot start my driver because of a “device is used” error. And vice versa if the driver is active I cannot start a MAX test panel for the same reason.

Then I tried to retrieve the name of the MAX task using “DAQmxGetSysTasks”.
This also works fine. But only if no MAX-task is active.

I could not get to verify that a write to a digital line is really written to the hardware. And also I cannot change a digital Iine in MAX and read it back to see if my driver works right.

Does someone have an idea how to monitor output and perhaps change input values for reading it back via driver?

Thank you.

 

Norbert

 

 

 

 

0 Kudos
Message 1 of 3
(4,125 Views)
Solution
Accepted by topic author Norbert_Schade

Hello Norbert,

 

first of all, please consider this KB on

Considerations for Using NI-DAQmx Simulated Devices

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x0PxCAI&l=en-US#toc4

According to this, there is no way to read back data written to a simulated device. It can only be used to check whether device configuration and calls to the device are correct.

Whenever you use the MAX test panel to access a device, this resource is reserved and you'll get the “device is used” error when you try to access it from a different location.

 

Best regards,

Jacques

Jacques Scheller
Staff Applications Engineer, NI Germany
Certified LabVIEW Developer, Certified TestStand Developer
Message 2 of 3
(4,112 Views)

Hello Jacguess,

 

Thank you,

 

Norbert

0 Kudos
Message 3 of 3
(4,002 Views)