LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Pci Parallel Port address to write or read too ?

Hi AI B

I am unable to read or write to my device.
what i do is, I send it a binary file, Byte by Byte.
The code is cut down.
This is what i got so far:

Status=viOpenDefaultRM (&defaultRM);
Status=viOpen (defaultRM, "ASRL11::INSTR", VI_NULL, VI_NULL, &instr);
Buffer[0]='1';
Buffer[1]='\0';
Status = viWrite (instr, (ViBuf)Buffer, 1, &SendCount);

This gives me a timeout error.
All i need is to send one hex value at a time eg (0x01,0x00)
And the same error is given when i try to read from that instrument.

I got another question, What pins is needed for Visa to work ?
Cause i currently only got pins 3,9,10,11,12 and 21.
Its all i need cause the cable is not a standard parallel , the cable Its more like a telephone cable. 
Help share your knowlegde
0 Kudos
Message 11 of 15
(2,270 Views)

Hi dear Shako,

i'm not understand, why you send me message for AI B ?????

 

You shure excuse me any small comments for your: 

1.  When you need access on any ports COM or LPT, you NOT NEED INSTALL over 400MB VISA software :-(((( MY GOD !!!!!

2. The VISA not supported PARALLEL ports!

3. Serial ports: For sample under W98/W2K/XP etc. in VB5/6 etc. you can use MCSOMM32.OCX - i think COM1 to COM4 (very easy for use)

4. Parallel port (LPT): you MUST KNOW only base address, under W2K or XP are exist in registry or you can red from w-settings. 

5. For input & output on any ports under NT-platform (access on hardware in Ring0 ) existing for sample PORTTALK.SYS or INPOUT32 (hwinterface) or etc.... Please see on web.

 

I'm use the PORTTALK.SYS ver. 1 (size 7 kB! of 400MB VISA) http://www.beyondlogic.org - very easy and nice work under NT-platforms.

With utility ALLOWIO.EXE you can acces on ports with your old software without problems.

very-very easy calling sample: ALLOWIO 0x378 0xA800  C:\MYPATH\MyproPram.exe

  (allowio ver 2 installing porttalk.sys on your system automaticaly.)

 

 

Best Regards

Paper

 

 

0 Kudos
Message 12 of 15
(2,252 Views)

Hi Shako,

 

I'm sure there are other ways of communicating with a parallel port using a smaller software as paper has pointed out, but the supported NI software used for all instrument communication is VISA.  VISA does support parallel communication, and has had this capability since version 1.1.  Before writing your instrument control code, you can use a program that comes with VISA called Measurement and Automation Explorer(MAX) to test your communication.  You can find this program under Start»All Programs»National Instruments»Measurement & Automation.  To access your instrument, navigate to Devices and Interfaces»Serial & Parallel, find your parallel port, thn click open VISA test panel at the top.  If you are able to communicate with the instrument in the test panels, take a look at the VISA examples (Start»All Programs»National Instruments»VISA»Examples).  If not, the problem may lie in the fact that you are not using all pins.  Please let me know if you are still having any problems!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 13 of 15
(2,227 Views)

Hi paper,

 

Shako, actually, did not send you a message personally.

It is the forum engine that sends those mails to anyone who ever sends a message to a topic.

Since you sent a message to this topic, you'll be informed about any further messages sent to this topic, whether they are directly intended for you or not.

 

Since I am sending a message now, I'll get e-mails from NI about new messages sent by anyone to this topic.

I hope I could make it clear.

Have a nice day, 

S. Eren BALCI
IMESTEK
0 Kudos
Message 14 of 15
(2,219 Views)
Hi AI B 

Thanks for all your help I decided to let the user input the address to the parallel port.
VISA does not work cause I do not use all the pins, I’m only using 5 pins.
If I find a solution I will post it here.

Thanks Again.Smiley Wink
Help share your knowlegde
0 Kudos
Message 15 of 15
(2,185 Views)