RE: Bdi4emc-help Digest, Vol 11, Issue 9
Thanks for the help! Craig *------------------------------ * *Message: 2 *Date: Tue, 12 Dec 2006 21:04:18 +0000 *From: Paul <[email protected]> *Subject: Re: [Bdi4emc-help] BDI - Motenc-Lite Issue? *To: [email protected], "[email protected]" * <[email protected]> *Message-ID: <[email protected]> *Content-Type: text/plain; charset="iso-8859-1" * *On Sunday 10 December 2006 22:10, Craig Gadd wrote: *> I've been working on my BDI-EMC system this weekend and came across a *> problem that I think may be software related... My setup is a *> Motenc-Lite card with a 7525 IO termination board, and a 7535 IO board. *> *> I have my control system prototyped on a table and have been struggling *to *> get any motion out of the motor(s). I attributed the problem to my *wiring *> "skills" and my proof of damaged was that vsitest.c (available on the *Vital *> site) reported a "Segmentation fault" when compiled and run on BDI 4.50. * *A segfault is usually caused by a null pointer - Looking at the source, *line *79 is the culprit... * * if (dev == NULL) { * printf ("\nVendor %X Device %X\n", dev->vendor_id, dev->device_id); * printf ("PCI Motenc Card Not Found\n"); * return -1; * } * *The first printf uses dev which will always be NULL, hence the segfault... * *> Before I sent my card back, I went and down-revved BDI to version 4.38 *and *> the segmentation fault error went away. The utility seems to function *> properly allows me to communicate with the board, send voltage to the *> amplifier etc. Any thoughts? * *It looks like the the later versions of libpci require the use of *pci_fill_info() before any data can be read from the internal structures - *Without valid data, the tests for vendor & device ID were failing and *triggering the segfault.. Attached is an updated vsitest.c that runs with *the *card I have here. * *Abdul: The changes should be compatable with earlier versions of libpci, so *you may want to update the MOTENC-Lite & MOTENC-100 files.. * * *Regards, Paul. * * * *------------------------------ * *_______________________________________________ *Bdi4emc-help mailing list *[email protected] *https://lists.ourproject.org/cgi-bin/mailman/listinfo/bdi4emc-help * * *End of Bdi4emc-help Digest, Vol 11, Issue 9 ********************************************
participants (1)
-
Craig Gadd