LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Parallel Port For Non-standard communication in VISA

Hello, I am trying to get a old spectrometer (SPEX 1680) working that uses a weird form of parallel port communication. I am rather new to Labview but it seems like VISA is only letting me send command to a serial port rather than controlling individual pins as being high or low (see attached section of the manual for what I need to send). A old program worked on windows xp using Out Port.vi but that doesn't seem to be available on any thing but xp and I rather not install xp if I can avoid it. Out Port.vi was just sent numbers and a address to move the stepper motors. How can I get visa to change single pins on a parallel port?

 

 snapshot1.png

0 Kudos
Message 1 of 8
(2,939 Views)

This example looks like it might help you:

 

Using VISA to Access the Parallel Port in LabVIEW

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 8
(2,915 Views)

I did see that code before but I wasn't able to get it to control anything. There also doesnt seem to be any change in voltages running vs not on the pins of the parallel port but I am not sure what that should look like.

snapshot2.png

0 Kudos
Message 3 of 8
(2,863 Views)

Well I have never tried this code so I can't vouch for it, but it "should" work...

 

Anyway the type cast changes the integer output of the Boolean Array to Number into a string as VISA Write only accepts strings.

 

Looking at the notes on the example it says pins 11 (printer busy) and 12 (printer out of paper) must be grounded to transmit data. 

 

But your diagram shows Pin 11 as "Step" and Pin 12 as Limit LO.

 

If VISA requires these lines to be pulled low to send data out the other pins and your device requires these pins for other controls, you might not be able to use VISA.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 8
(2,856 Views)

Im confused why Visa's write buffer needs a string and how that string corresponds to the output on the parallel port since it seems I can put any number into it and I dont know what happens after that. So perhaps visa is translating it some how? The old windows xp vi would send values 1 or 2 to step forward or backwards into the write buffer input of "out port.vi" and thats what I am doing but nothing is happening.

 

I think ill have to install xp to get any work done.

0 Kudos
Message 5 of 8
(2,847 Views)

@TypT wrote:

 

I think ill have to install xp to get any work done.


We still have a couple computers in our lab running XP for similar reasons.

 

BTW: LabVIEW and Microsoft Windows Compatibility

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 8
(2,836 Views)

If the inputs of your spectrometer use TTL voltage levels than you could possibly drive them by bit-banging individual pins of a parallel port, but be aware that the pinout you attached doesn't correspond to a standard parallel port pinout, so an adapter or custom cable would be required to connect the appropriate pins.

0 Kudos
Message 7 of 8
(2,826 Views)

So the thing that seems really weird to me is that the past, working program on xp looked like this:

snapshot3.png

All it had to do was send a 1 or a 2 to "Out Port.vi" (which is only for windows xp/vista). However If I try to do the same with ni-visa, nothing is happens on the spectrometer. Could just be that the machine is broken and wouldn't respond even if it was receiving the proper signal, guess thats something to verify. 

 

So if I were to generate my own signal with some wires, would I just be able to put 5v on the step pin to get it to move? Im not sure what the signal should look like based on the manual's diagram, any ideas.

0 Kudos
Message 8 of 8
(2,804 Views)