Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-GPIB, NI-488DDK and 32-Bit DOS

Hi, I have just purchased the NI-488 DDK to go along with a PCI-GPIB card we have.  I need it to run under 32-bit DOS (DJGPP gnu compiler).  Has anyone adapted the DDK for this?  I have looked at the "DOS" code inlcuded and it has a lot of 16-bit code (seg offset, far pointers and such) which looksl quite painful to me.
 
I am also looking at trying to adapt the VxWorks or Linux code but I thouight I'd ask here and see if someon already has done this.
 
-Bob
0 Kudos
Message 1 of 8
(4,893 Views)
Bob,

There may be an easier way if you are planning to running this DOS program from inside Windows, the current NI-488.2 contains DOS support. But if you want to run your code on a dedicated DOS machine I am afraid that you are going to need to create your own driver as there is not one for the current PCI-GPIB as you have no doubt discovered.
-Marshall R
0 Kudos
Message 2 of 8
(4,853 Views)

Yes, I was afraid of that.  I am running strictly DOS in protected mode and going through the DDK code.  I am finding it somewhat overwhelming.  I am going back and forth between the code for 2 OSs that I have used (DOS and VxWorks).  I am finding that both have quite a bit of stuff that will likely require significant mods (DOS-32 doesnt have all the 16-bit gyrations that the DOS16 driver has and it doesnt have all the multitasking stuff of VxWorks).  I have found that I have underestimated the impact of this task in the overall design.

-Bob

0 Kudos
Message 3 of 8
(4,849 Views)
Good news is that I apparently got the code to work.
0 Kudos
Message 4 of 8
(4,756 Views)
Glad to hear you got it working!
-Marshall R
0 Kudos
Message 5 of 8
(4,715 Views)
So now it looks like I am having strange things happen with different instruments using the DDK.  I can query an HP6038a power supply for its settings and recieve data fine.  However, when I try to command it to a new voltage, it wont respond.  Somehow dvwrt() and devrd() are working but dvwrt() alone wit hthese commands doesnt?
 
I cant communicate with an hp8116A function generator at all.  with the 6038a I at least get a response when I ibcmd() it as a talker or listener.  The 8116a responds with nothing!  ibcmd() and ibwrt() status comes back with no errors and claims to have written all the bytes out but the device doesnt respond.  Of course, everything works just great when I boot back into Windows and use MAX so I know the card, instruments, and cables are OK.
 
Any ideas?  Anthing to try with the DDK #defines that might shed some light?
 
-Bbo
0 Kudos
Message 6 of 8
(4,587 Views)

Still having problems.  Looking deeper into what happens between these calls.  I see that ATN is still high after a call to ibcmd()?  Is this correct?  I had thought ATN was lowered automatically after ibmcd() is through.  the ensuing devwrt appears to be the call taht lowers ATN.  Again, ibsta show no errors even thought the instument I am addressing doesn respond to any command.

I tried setting ibeot to 1 or 0 but that doesnt seme to have any effect

As an aside, the ibln() function appears to detect all the isteners.

Feel like I am grasping at straws.  Is there a particular DDK expert I can get with?

-Bob

0 Kudos
Message 7 of 8
(4,569 Views)

Nothing comes to mind for me off hand, but I am far from a DDK  expert. Do you have a bus analyzer that your could use to view the traffic on the bus, such as the PCI-GPIB+? This would clue us in to if all the information is being sent properly. My hunch is the driver is not properly passing information to the hardware.

 
-Marshall R
0 Kudos
Message 8 of 8
(4,554 Views)