Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

dll labview isa vc

Is anyone know how to make a DLL file with VC++ 6.0 for LabVIEW 7.1'CIN to control output through ISA-BUS with 24 digital IO card (PPI8255)?
0 Kudos
Message 1 of 6
(3,621 Views)
@rJUn@,
 
It looks like you want to access a dll you've written in VC++ using LabVIEW. To access a dll in LabVIEW you'd use a "Call Library Function Node" which can be found by going to All Functions>>Advanced from the block diagram. I want to point you to two resources that will provide a great deal of help in using the Call Library Function Node. The first is the manual on using external code with LabVIEW called "Using External Code in LabVIEW". It can be found by going to Help>>Search the LabVIEW Bookshelf>>Using External Code in LabVIEW. Chapter 2 will provide insight on using DLLs in LabVIEW.
 
The second resource is an example that ships with LabVIEW called "Call DLL.vi". It can be found by going to Help>>Find Examples. Then in the "Search" tab, search for "dll". Double click on "dll"  and note the example programs that appear. Select "Call DLL.vi".
 
These two resources should get you started on your way. Post to let us know if you have further questions.
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(3,600 Views)
Dear Mr Chris,

Thank you Mr Chris. Actually, I haven't been written the dll. I know a little thing about programming VC++, but I don't know how to control i/o trough the ISA-bus using VC++. So, can you forward me the source code to do it, then I can use it in LabVIEW ?

Regards,

@rJUn@
0 Kudos
Message 3 of 6
(3,596 Views)

@rJUn@,

I noted that you said you are using a "PPI 8255" board. National Instruments doesn't make any product by that name. Are you sure that this is a National Instruments DAQ Board? I did a Google search and found the 8255 Programmable Peripheral Interface (PPI) by IBM. Is this the card you are referring to? If it is, then you'll need to contact IBM for help in creating your DLL because you'll be making calls into a driver that is specific to IBM. Once your DLL is written, you can then look at the example program and the manual I had pointed you to for help in calling that DLL from LabVIEW. If you still have questions, please let us know and we can move from there.

 

Post to let us know if the DAQ card you are referring to is named something else. Thanks!

 

Best Regards,

 

Chris C

Applications Engineering

National Instruments

 

0 Kudos
Message 4 of 6
(3,574 Views)

Dear Mr.Chris

Well, I am not surely know what product it is. But I have try to make the driver in c, and it works in Windows 98. Here is the driver :

#include <stdio.h>
#include <conio.h>
#include <dos.h>

#define PORTA 0x300
#define PORTB 0x301
#define PORTC 0x302
#define PORTCW 0x303

main()
{
float data;
float data1;
int inpp, input;

outportb(PORTCW,0x82);
for(data=0;data<=255;data++);
   {
   outportb(PORTC,data);
   data=data/51;
   outportb(PORTA,3);
   delay(0.00209);
   outportb(PORTA,2);
   delay(0.00209);
   outportb(PORTA,3);
   delay(0.00209);
   outportb(PORTA,1);
   input=inportb(PORTB);
   inpp=input/51;
   }
   return(0);
}  

But then I want to use the board with LabVIEW 7.1, so I have to convert he driver in VC++'s language because I use Windows XP. The matter is I can't do it. So, can you help me solving my problem, by converting the driver to VC++ languages, or maybe you can build the DLL from the driver for me  ?

Regards,

@rJUn@

 

0 Kudos
Message 5 of 6
(3,551 Views)
@rJUn@,
What you posted isn't a driver, but rather a program that uses driver. In any event, based on the calls being made to your card (like outportb(PORTC,data);) it doesn't look like you're using a National Instruments product. As I suggested before, you'll need to contact the appropriate manufacturer for their support.
 
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 6 of 6
(3,535 Views)