Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6036E Digital Outputs

Hello,

I am currently working on a project that requires the use of SimuLINK and xPC Target. The setup right now involves two computers, one to run the actual MATLAB/SimuLINK files and the other that has the National Instruments PCI-6036 E-Series card which controls a couple of stepper motors. The two computers are connected through an ethernet cable. On a separate project, I have been successful in using a PCI-6031E block (there is no 6036 block available in the library) to control analog outputs. When I attempt to use the digital output 6031 block, xPC Target gives me an error saying that the 6031 card is not present. I am wondering if the 6031 block can only control analog outputs on the 6036 card, but not digital outputs?

Just recently I have created a PCI-6036E block, and have added it to the xPC Target Digital Outputs library. Everything compiles fine, but when I run getxpcpci('all') in MATLAB, the 6036 card is shown as an "Unknown Device". Also, xPC Target complains that the board is not "present". I have searched the "Unknown Device" error on the Mathworks site and have discovered that it is actually a bug that was fixed in MATLAB R14, service pack 3, of which I am in the process of downloading. I am wondering if this "bug fix" will cause my 6036 board to be recognized by xPC Target or if it is a different problem.

The way I created the new block was just using an S-function, and basically copying the 6031E block, but editing the donipcie.c code to add another case statement for the new block with an appropriate devide Id for the new 6036 block, devId=0x2890, I believe. I also added this same case statement to the mdionipcie.m file (spelling may be incorrect). Comparing two blocks, the 6025 and 6031, I found that they were pretty much identical, other than labels. They seemed to point to the same source files and everything (donipcie.c). I used the same structure for the 6036 block that I made. If there is some crucial step that I am missing, please mention it or atleast lead me in the right direction for creating my own driver blocks.

Just an aside, we have a 6025 card borrowed from a separate lab and we tried that in the target PC. Everything worked fine and xPC Target did not complain. So, that leads me to believe that as long as we can get xPC Target to recognize the 6036E card, through the use of the new block, all of my problems would be solved.

Thank you for your time.
Erik

Message Edited by ErikM. on 05-11-2007 03:52 AM

0 Kudos
Message 1 of 3
(4,078 Views)

I can't speak definitively for xPC, but I believe they must write low level drivers for each card they support.  Thus, downloading the fixed version will likely address this issue.  Let us know how this turns out.

 

All the best,

-Rob

-----
Rob Purser
Manager, Test and Measurement
MathWorks
rob.purser@mathworks.com
0 Kudos
Message 2 of 3
(4,068 Views)

hello ,

     this is Raju.could you please send me the code how you run the stepper motor using pci card.

 thanks in advance.

 my email id:raju_zm@yahoo.com

0 Kudos
Message 3 of 3
(3,778 Views)