xpctarget execution time runs faster than real-time with parallel port interrupt
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nicolas
le 11 Oct 2013
Réponse apportée : Rajiv Ghosh-Roy
le 11 Oct 2013
Hi all,
We use an xpctarget for realtime robot control, which gets an external interrupt (from a Linux computer) over parallel port.
With our old setup (r2009a) and our older xpctarget PC everything works fine.
However, we are replacing the old xpctarget computer with a newer machine (and xpcTarget 5.5 r2013b) and have difficulties with the xpctarget execution time.
The target options are: Execution mode: Real-Time Real-time interrupt source: 7 I/O board generating the interrupt: Parallel_Port ISA base adress: 0x378
With the old xpctarget computer this works fine, however with the new computer we have several differences and difficulties: -parallel port is now a PCI card not on board -even if AMI BIOS entry for the parrallel port is set to 0x378, IRQ7 the getxpcpci('all') shows an IRQ of 11 for the parallel port and the model cannot run.
We can get the model to run with our new computer by changing the AMI BIOS entry for the parallel port to 0x378 IRQ=(5,7,10,11,12) and changing the xpctarget option "Real-time interrupt source" to 11. However, then the execution time shown on the xpctarget runs faster than Real-Time. Interestingly, the xPCTargetTime block with the standard division of 1.139 runs in seconds, whereas the excecution time runs way too fast.
We have tried several different settings (e.g. using another ISA base adress e.g. 0x278) or all the three possible settings in the AMI BIOS for the IRQ channel: - IRQ5 - IRQ7 - IRQ(5,7,10,11,12) But we experienced the same behavior.
I am afraid that the xpc gets more interrupts than the Linux sends because it uses IRQ11 for a lot of different cards (e.g. also EthernetControllers) and therefore might just receive more interrupts than 1 every ms and therefore run too fast. However, I am confused, that the getxpcpci('all') always tells me IRQ11 independant of BIOS settings. I am also confused because the xPCTargetTime block seems to work correctly.
I have also tried to use different PCI slots for the parallel port and remove all other PCI cards, but without success (there are still other mainboard components using IRQ11 according to getxpcpci('all').
However, I am pretty sure the signal sent from our Linux computer over parallel port is timed correctly as it has been working with the old xpctarget on IRQ7 and the functionality of the xPCTargetTime block with the new computer.
Do you have any ideas how to ressolve this? What would be possible steps to ressolve this? Did we forget any setting? Does the execution time shown on the xpcTarget matter at all? Or does it run according to the time given from the xPCTargetTime block?
Thanks a lot for your help, I appreciate any hints.
0 commentaires
Réponse acceptée
Rajiv Ghosh-Roy
le 11 Oct 2013
Hello,
It looks like you are using a plug in parallel port board; the original driver was written for the parallel port that is built in to the motherboards.
One possibility is if you can move the board to a slot where it does not have an IRQ conflict; sometimes the BIOS may allow you to reassign the IRQ as well.
The xPC Target Time block uses a hardware timer; the execution happens off the interrupt you specify (timer by default), and xPC Target assumes that the signal for the interrupt is coming at the rate you specified (if not, the time will be off as you have noticed).
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Target Computer Setup dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!