Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't read parallel port by VISA

Dear all
 
  I need to control parallel port, and use VISA to control. I got the document from ni and I can wirte data very well.
 
  But when I
   1.   change VISA write to VISA read  or
   2.  use MAX "open VISA section" to read data, it can't work. the return value is "BFFF0015"
        and the LPT port have error message as this:
        "VISA returned this device when finding resources, and MAX could use VISA to parse the resource name.  MAX could not succesfully open a VISA session to the device."
 
   I find many doucument and dissuction and didn't find way. What should I do to solve the problem?   Thank you for the help.
 
  ps. 1. I can't use IN OUT module, because my parallel port is PCMICA to parallel port card. It can really write data correctly.
        2. The error screen is at the attach.
 
 
Download All
0 Kudos
Message 1 of 4
(4,423 Views)

Hi ynien:

Is all of this in MAX?  Are you ever able to Open a VISA Session in MAX?  The error you are getting is a timeout error.  This is usually an indication of incorrect termination in the VISA write?  How are you verifying that your VISA write is working?

Regards,

Emilie S.

0 Kudos
Message 2 of 4
(4,379 Views)
VISA actually uses the Windows API to allow access to the parallel port in VISA.  Due to the limitations of the Windows API, only write operations are allowed through VISA commands to the parallel port.

In order to perform parallel port input, it is necessary to program the parallel port directly, as discussed in the following tutorial.  The Tutorial is written for LabVIEW 6.1, so I am also including a link to a KnowledgeBase article about register level programming that will allow you to apply the concepts in the tutorial in newer versions of LabVIEW.

Tutorial: Using the Parallel Port in LabVIEW

KnowledgeBase 2Q1FC3K8: Accessing Hardware Registers and Physical Memory in Windows NT/2000/XP with ...
0 Kudos
Message 3 of 4
(4,320 Views)

Dear all

Thank your for your reply.

I'm sure that MAX can see the parallel port, and named LPT2 and LPT3 ( the card has 2 port), and I can use VISA to write data ( but can't read).

The way I verify is connect parallel with LED, I can see it show the light correct.

Due to VISA can't work well, I  use IN/OUT port to write directly, But the LED didn't shown any change.

Recently, I try USB-RS232, MAX can see the device, and I can config many porperty like delay time....when using NI-VISA3.31,  But it can't read write data.

I also read write directly, and test it by UART self-test, and it didn't work, either.

I'm tring another way to control the computer ports. If you have any suggestion, please tell me.

Thank you!

0 Kudos
Message 4 of 4
(4,244 Views)