Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Control "homemade" device by PC parallel port

 

Hi, everyone! I am newbie and I have a project. Create VI which would generate pulses and send it through parallel port to device.  

Pulse generators: 1 master

                           7 slaves

 

                Slave:

                         synchronized with master

                         adjustable time-out before the beginning of the generated pulse

                         pulse duration: 50 microseconds - 360 s

 

I have looked an an example  of "parallel Port Read and Write Loop.vi" but didn't help a lot.

Please, help me. Thank you. 

0 Kudos
Message 1 of 5
(4,038 Views)

You will need to provide more information than that. What does "synchronized with master" mean? What does "time-out before the beginning of the generated pulse" mean? Is the computer the master, or is the master some other device?

 

First, let me remind you that the parallel port is not a general-purpose DAQ device.  While it can be used for digitial I/O it is quite limited in doing so. At a minimum it's software-controlled. This means you have to toggle the line high and low to create a pulse. This means that you will likely never get a 50 microsecond pulse using modern operating systems. See this thread for a recent discussion on someone else who thought they could use the parallel port as a high-speed device. Your best bet is to look into a cheap DAQ device like one of the USB ones that NI makes, or something else from a third-party vendor. 

Message Edited by smercurio_fc on 05-18-2010 08:54 AM
0 Kudos
Message 2 of 5
(4,010 Views)

Otherwise, you may use some microcontroller starting kit, spending about 50€ you should be able to write a real-time application with 1us or less time resolution capability. And you can communicate with your PC with through USB port (with some limitations).

Of course, you need some time to get familiar with the uC, but starter kits always deliver good tutorials and quick-start examples.

Just an idea...

Regards

0 Kudos
Message 3 of 5
(3,984 Views)

 

Grateful for ideas,

..but my task is to create  VI which would control a device (device for biomedical research) and generate TTL pulses through parallel port. I understand that likely never  get a 50 us pulse. The goal is to get it as possible close to it.

About the project… Generate 8 TTL pulses. One master mode:  width of pulse t=40us…4000s, Period T=50us…3600s and 7 slave modes.

Slave:

1    1) When the signal generator in Master mode is operating, the signal generator in Slave mode should be synchronized to the Master. If signal generator in Master mode shuts down, the signal generator in Slave mode will stop to operate. If the Master unit is turned back on, the Slave unit will resume synchronization.

   2) Adjustable time-out while generated pulses start. deltaT=50us…3600s.

   3) Pulse width t=40us…3600s

4   4) Period T=20us… up to full 

 

Please, look attached picture.

 

 

 

 sorry if my English is not perfect 🙂 

 

0 Kudos
Message 4 of 5
(3,964 Views)

You're not going to get anywhere close to what you want by trying to use the parallel port, but you're more than welcome to try just to prove it to yourself.

 

To control the parallel port you must write a full byte. There's an example that ships with LabVIEW on how to control the parallel port lines. Open the Example Finder and seach for "parallel" and open the "Parallel Port Read and Write Loop" example.

0 Kudos
Message 5 of 5
(3,945 Views)