Jump to content

Frequency Parallel Port Output Question


Xander

Recommended Posts

Hi Guys,

I want to drive realtime or with a known delay the outputs on a parallel port. Is it possible to drive the output ports without a extern delay caused for example by windows, or is it possible to drive the ports with a known delay? What is the highest frequency by which labview can toggle to ports?

Link to comment
Hi Guys,

I want to drive realtime or with a known delay the outputs on a parallel port. Is it possible to drive the output ports without a extern delay caused for example by windows, or is it possible to drive the ports with a known delay? What is the highest frequency by which labview can toggle to ports?

Xander,

Although this is not something I've played with, this link sends you to this forum's LabView FAQ that talks about using the parallel port. While you are there, there are plenty of other wonderful topics of LabView wisdom that I highly recomend you browse through.

In general, pure software driven pulses tend to have much larger jitter and lower frequencies that hardware solutions, and if you need a software configurable high (up to 20MHz or so) low jitter TTL/CMOS style output, I would highly reccomend getting a some NI hardware with some counter/timers on it. They are very versitile and once configured they can operate independant of the computer's CPU. Counter/Timer's jitter specifications are (or at least close to) those of the oscillator driving them.

Hope this helps,

-Pete Liiva

Link to comment

Hi pete,

Thank you very much for your reply. I only want to toggle the ports to a frequency of 17Hz.

Does labview directly toggle the ports or does windows have a driver which toggles the port. Windows works by process priorities so I don't know if I can make a stable toggle frequency.

Link to comment
Hi pete,

Thank you very much for your reply. I only want to toggle the ports to a frequency of 17Hz.

Does labview directly toggle the ports or does windows have a driver which toggles the port. Windows works by process priorities so I don't know if I can make a stable toggle frequency.

Xander,

Well, the term "stable" begs for specification! Can you specify how stable you need it to be?

I haven't actually done this with a parallel port, so I will make a swag (silly wild a&& guesses) that you ought to be able to sustain a 17Hz +/- 1Hz rate (maybe better, but I can't say how much better) with an occasional outlier here and there. It would be best if the PC you use were as bare-bones in terms of loaded software as possible. It would also be best (for stability) if the PC was not tasked to do anything else while performing this function. If you don't need this machine connected to the internet, then disabling and/or eliminating any form of virus checker/spyware checker would help as well.

If you have any budget at all, you could purchase a cheap NI PCI-6601 at this link for about $300 US (maybe another $100 or so for a cable and connector block). You could use one of the counter timers on it to output 17 Hz easily, unless you have some insane stability specification like <<1 x 10-6 frequency drift or something like that. In therory, once you configure the counter timer through the software, it would run independant of the windows operating system until you either told it to stop, shut down the power, or disconnected it.

There are probably cheaper solutions out there, but I don't tend to go so far as to try to "roll my own" oscillator circuits or things like that. I know some people who have gotten decent lab equipment off of ebay and at used equipment dealers, so maybe a cheap used function generator might be a possibility?

Hope this helps,

-Pete Liiva

Link to comment
  • 2 weeks later...

Hi Pete,

Thanks for your reply. I've decided to test with the parallel port. When the port doesn't suit my needs I'll decide to buy a DAQ card. Your tips are very helpfull to me, thanks for that!

So currently I'm testing with my parallel port. I can toggle bits through the example program packed with labview. Now it's time to decide if I can toggle to port with a (nearly) perfect frequency. The port out.vi writes a byte at a time. Now I only want to test the response of one port. What's the best way to toggle the port(s) by a entered frequency in software?

I'm not very familliar with labview, so I have to practice alot!

Link to comment
Hi Pete,

Thanks for your reply. I've decided to test with the parallel port. When the port doesn't suit my needs I'll decide to buy a DAQ card. Your tips are very helpfull to me, thanks for that!

So currently I'm testing with my parallel port. I can toggle bits through the example program packed with labview. Now it's time to decide if I can toggle to port with a (nearly) perfect frequency. The port out.vi writes a byte at a time. Now I only want to test the response of one port. What's the best way to toggle the port(s) by a entered frequency in software?

I'm not very familliar with labview, so I have to practice alot!

Hi Xander,

Well, here is a picture of a quick and dirty "simple" approach.

post-2931-1151623018.jpg?width=400

I can't guarentee this will work, I happen to be in a busy spell at work and will be out camping with the family this weekend, so I have no chance to verify that this strategy will work. Hopefully you know what "Shift Registers" are. If you don't, look them up in the help function. Getting to understand these early in your LabView experience is important. You will have to find out for yourself what the values are that go into the "address", "write value 1", and "write value 2" for your system.

A few things to note. I have this set up to so that the user sets "millisecond multiple" and the program lets the user know what the "Nominal" frequency is. The fastest settable frequency is 500 Hz (the loop sets the port to one state, waits 1 ms, set it to the other state, waits 1 ms, so one cycle is 2 ms -> 500Hz). If you set it to zero, the loop will race as fast as it can, which means there is no direct control over the frequncy, you get what you get and that could change depending on what else the CPU might be trying to do. In fact, this program is unable to guarantee ANY frequency with the stability of even a "bad" crystal oscillator.

Hope this helps,

-Pete Liiva

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.