Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

how does 7344 driver work under rtx with vc

Hello everyone
 I am using the PCI 7344 card.Under windows system I  use the flexmotion32.dll well with vc,but when I use it under rtx ,it does not work,appering " can not load the driver".The fact is ,as most say,the driver is not suitable under non-windows systems. So I wonder
if there is driver under the rtx,or how to use the windows driver under the rtx.
If it is necessary to develop my own motion driver,what can I do?Does 7344 support register lever programming ? If it does, Can I  get the register map of the 7344?
 Hope your reply!!
Thank you!!
0 Kudos
Message 1 of 13
(5,269 Views)
Bgrain,

I have been working with VC under RTX a while ago to acquire data from NI data acquisition hardware that was running with the normal Windows driver. This worked pretty well as I have used the WinAC SDK from Siemens that offers templates for this purpose. This SDK was part of the Step7 development package for Siemens Soft-PLCs so I don't think you could use exactly this software but maybe something similar is available as a general purpose programming library. The disadvantage of this method is of course the fact that you loose the deterministic behavior of RTX while accessing hardware that is running with Windows drivers. So you should run this task in a non time critical loop.

Depending on your requirements it could be a better option to develop your own driver using the NI-Motion DDK.

I hope that helps,

Jochen Klier
National Instruments Germany
0 Kudos
Message 2 of 13
(5,257 Views)

Hello!
  As most say:we can develop simple driver with rtx development tools,however the command port must be known!So  I  wonder if we can obtain the information that which port is corresponding to which command.For example,if I want to load a position to the card ,which port should I send commands data to?How could I know the address of the port?

Can ni offer the above information?

Thank you !!!
Hope your reply!!!

0 Kudos
Message 3 of 13
(5,245 Views)
Bgrain,

I had a closer look at the NI-Motion DDk. It should contain everything you need to develop your own driver. Here is one section from the Device Information chapter of the DDK:

Control Registers

A hardware driver writes to and reads from registers. Because the motion controller is memory-mapped, you can read and write directly from an unsigned short pointer (16-bits). The following registers are defined for communicating with the motion controller:

  • Communication Status Register (CSR)—This register is located at cardLogicalAddress + 4 (8 byte offset).
  • Move Complete Status (MCS)—This register is located at cardLogicalAddress + 2 (4 byte offset).
  • Return Data Buffer (RDB)—This register is located at cardLogicalAddress. Read this address to get data back from the controller. Before you read this address, verify that the Ready to Send bit is set in the CSR. You must perform this check before reading each word in the packet. Refer to Return Data Buffer (RDB) for more information.
  • Command Buffer—This register is located at cardLogicalAddress. Write to this address to send a command packet to the controller. Before writing each word in the packet, you must check that the Ready to Receive bit in the CSR is set. If you send an invalid packet, send 0x0A until the Packet Error bit in CSR is cleared.
You can find all CommandIDs in the Functions chapter. So I think the only missing information should be the cardLogicalAddress. As much as I know it depends on the OS you are using how to retrieve this information. If you don't know how to get this information for a PCI-board under RTX I'll try to get some help from R&D for you to find it.

Jochen Klier
National Instruments Germany

0 Kudos
Message 4 of 13
(5,242 Views)
HI
Thank you for your reply!
 In fact I don`t know how to get the cardlogicaddress information!
 so hope your help!!
thank you !!
0 Kudos
Message 5 of 13
(5,239 Views)
Bgrain,

I'm waiting for an answer from R&D. I will post to this thread again as soon as I know an answer.

Jochen
0 Kudos
Message 6 of 13
(5,231 Views)
Bgrain,

here is an intermediate answer:
How to get the cardlogicaddress depends on the OS. As we have little experience with RTX maybe Ardence (formerly VenturCom) can provide better information than NI can do so I would suggest to contact them.

I'm also still waiting for a person to return to the office who might be able to help you. Please stay patient.

Jochen

0 Kudos
Message 7 of 13
(5,216 Views)
Bgrain,

unfortunately it looks like our knowledge about RTX is quite limited. So my best advice is to contact Ardence for help. The only thing that NI can provide is this tutorial. Maybe it gives you at least some general ideas.

Jochen
0 Kudos
Message 8 of 13
(5,172 Views)
Jochen
Thank you all the same !!
Now I have found some information of the base addresses of the 7344 card.  Through reading from the pci configuration space,baseaddresses[0] and  baseaddresses[1] have been found . baseaddresses[0] is the base-address of the miniMITE
and I can get the vendor ID, device ID by directly reading from   baseaddresses[0] +offset,but  baseaddresses[1]  does not like to be the base address of the 7344 registers,because I can not get the correct status information when I read from the csr(baseaddresses[1]+0x04).
It says in ddk that the csr is located at cardlogicaddress+4(8byte offset),so I wonder what  the cardlogicaddress is . What is relationship between baseaddresses[1] and cardlogicaddress?
Moveover,where can I get some information of the souce code of the ni motion functions?because I have no ideas about how to make the packet that is send to the card!!
0 Kudos
Message 9 of 13
(5,168 Views)
Jochen
Thank you for your help!!
I have found the cardlogicaddress which is the baseaddresses[1] read  from the PCI configuration space.
Now I read back the correct csr value !!
Thank you!!
 
 
 
 
 
0 Kudos
Message 10 of 13
(5,161 Views)