Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use the PCI 6703 digital outputs with Matlab xpc

I have a PCI 6703 installed in an Matlab xpc target.  Matlab provides a driver block for the analog output but not to control the digital outputs.  I'd like to control the digital outputs if anyone knows of a block available or if a register map is available so I can write my own.

0 Kudos
Message 1 of 9
(4,145 Views)

Hello Celin,

 

Do you have a MathWorks(C) account? If not you'll want to create one and then search for the article, "Parallel Port Digital Output Control Bits". It looks like this article from their website will be a good starting point on how to accomplish this.

 

Regards,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 2 of 9
(4,134 Views)

Thanks for the quick feedback.  I looked at the article you suggested and it provides information on accessing the parallel port but not the 6703 on the PCI bus.  Yes, the parallel port could be used in my application similarly to the digital IO of the PCI 6703 but this port is being used for other purposes.  I did a bit of research and can't find an existing simulink block to support 6703 Digital IO.  I guess at this point I'm in need of the register information for the digital pins if available.  Please advise.

0 Kudos
Message 3 of 9
(4,128 Views)

Hi Celin,

 

Unfortunately register level programming is not officially supported on this board. Did you see this other discussion forum post? Check out the Driver Development Kit examples at the link at the end, I hope these may help.

 

Regards,

 

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 4 of 9
(4,119 Views)

I did see the other post from 2006 indicating no regiser support.  Thought NI may have provided improved support over the past few years.  I'll see what I can do with the programming examples.   Thx.

0 Kudos
Message 5 of 9
(4,112 Views)

Thank you, and please let us know how it goes or if you have any more questions along the way.

 

Regards,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 6 of 9
(4,103 Views)

Hi Celin,

 

MathWorks has a toolkit called the Data Acquisition Toolbox which supports the 6703 and I believe can do what you need (you should probably confirm this with MathWorks as I'm not too familiar with their toolkit).

 

An alternative route that I've seen people take in the past would be to use NI's DAQmx driver to write C Code, compile into a .dll, and then call from MATLAB.  DAQmx provides LabVIEW, C, and .NET APIs.

 

National Instruments also used to provide some support for MATLAB, but it has become a bit dated and the other two options are probably better (although this might be worth a try if the other options do not work out).

 

 

Best Regards,

John Passiak
0 Kudos
Message 7 of 9
(4,097 Views)

John,

 

I believe both of the solutions you proposed require the windows operating system.  My model is running on the xPC target computer which runs under the Mathworks xPC Kernel (no Windows support function).  If you know of a way to get either solution to work in this environment please advise.

 

Thx.

0 Kudos
Message 8 of 9
(4,082 Views)

Hi Celin,

 

My apologies, I overlooked the xpc part.  You are correct. 

 

MathWorks has support for the 6703 in their xpc driver, but as you have found out it only supports Analog Output (according to this).  I suggest you contact MathWorks with any questions regarding hardware support in their xPC Target software since it is not maintained or supported by National Instruments (and too be honest I am quite unfamiliar with it myself--I wish I could offer more advice).

 

You might consider adding another PCI device to your system if you have a slot available.  I saw that the NI PCI-6503 is supported on the list I linked above.  This board has 24 lines of static digital I/O which appear to be supported on the xPC target.  There might be some non-NI alternatives as well, but I just noticed the 6503 since I am familiar with it.

 

 

Best Regards,

John Passiak
0 Kudos
Message 9 of 9
(4,069 Views)