Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Parallel Port Script

Status
Not open for further replies.

MasterMark2000

New Member
Using Windows XP. Needing a real simply (for some) Batch Script that I can run using Windows Task Scheduler. Using the LPT-1 Parallel port I need to Turn ON and OFF one
Output Pin on the port. I'll be using Port Address 0378 and need to send a DATA 1 for about 1 second , DATA 0 to turn off , and then end script until next useage. I have tried several Parallel Port controller programs, but I have to input or press START and can not automate. Tried writing something in VB and Real Basic, but no luck as of yet.

Thanks

Mark
 
Using Windows XP. Needing a real simply (for some) Batch Script that I can run using Windows Task Scheduler. Using the LPT-1 Parallel port I need to Turn ON and OFF one
Output Pin on the port. I'll be using Port Address 0378 and need to send a DATA 1 for about 1 second , DATA 0 to turn off , and then end script until next useage. I have tried several Parallel Port controller programs, but I have to input or press START and can not automate. Tried writing something in VB and Real Basic, but no luck as of yet.

Thanks

Mark

hi,
Look at this Blog link.
https://www.electro-tech-online.com/blogs/ericgibbs/148-pc-parallel-port-timer1-v1-1.html

Look at the VB5.zip file

EDIT:
You may find this version more suitable.
Unzip into a folder create\named C:\ParaTimer2
 

Attachments

  • ParaTimer2.zip
    79.5 KB · Views: 204
Last edited:
The Timer Program listed in the above Blog Link is a great little program and works. However, I am still in need of a simple script that I can run via Batch.. I will use it with the JIT Scheduler program which will run the script once per week , every week, at random times. It will be used to trigger our EAS (Emergency Alert System) box to activate our Required Weekly Test. I am not a programmer, but think a few lines of programming will allow me to Turn Pin #2 ON for a second, and then back OFF when the script is ran.. The next week, same thing.
 
The Timer Program listed in the above Blog Link is a great little program and works. However, I am still in need of a simple script that I can run via Batch.. I will use it with the JIT Scheduler program which will run the script once per week , every week, at random times. It will be used to trigger our EAS (Emergency Alert System) box to activate our Required Weekly Test. I am not a programmer, but think a few lines of programming will allow me to Turn Pin #2 ON for a second, and then back OFF when the script is ran.. The next week, same thing.


hi,
You can schedule to run a VB5 exe file from within its own program after loading in the Start programs.

Post your source code attempt at the VB program.

Did you see the EDIT in my last post?
 
Eric - thanks for taking the time to answer my questions. Unfortunely I am very new with VB , so just trying to figure things out. Yes the ParaTimer2 program works as written. It allows 3 seperate times in a 24 hr. time period. I need a scheduler that will allow me to schedule 6 months or a year in advance as to when this pin is triggered. The JIT Scheduler will do this, allowing me to run a script (.bat or compiled .exe file) any day of the week and month. So a simple Batch file that will turn one of the Output Pins ON and then OFF is what I'm after.. Nothing fancy..
 
Eric - thanks for taking the time to answer my questions. Unfortunely I am very new with VB , so just trying to figure things out. Yes the ParaTimer2 program works as written. It allows 3 seperate times in a 24 hr. time period. I need a scheduler that will allow me to schedule 6 months or a year in advance as to when this pin is triggered. The JIT Scheduler will do this, allowing me to run a script (.bat or compiled .exe file) any day of the week and month. So a simple Batch file that will turn one of the Output Pins ON and then OFF is what I'm after.. Nothing fancy..

hi Mark,
I guess you are asking for a VB program to do the task.?:)

I could create a working VB working program, give me a couple of days to post the source code and exe file, you can then edit to fine tune.
Which version of VB are you using.??
 
VB 2008 express

I guess my very old VB5 is compatible with 2008Express if you can open and run the *.vbp files in that Blog zip.??

I will write a VB program template for your project.OK
 
VB 2008 express

hi Mark,
If you your PC that runs the scheduler is not permanently powered ON, you should be aware of the action of the PC's P.O.S.T. tests which are run at every power up.

On MOST PC's the output pins on the parallel port will be tested during the POST period and after the test they will remain in the High state ie: nominal 4V.

EDIT2:
For reference, further checking on my PC, the port pins are set high for 1second just after the POST of the keyboard, then go low for 1 second, then high again until the Desktop display layout is finalised [about 60 seconds on my PC]. then they go low and remain low...


Its important that you check the parallel port on your project to determine the POST test state of the pins, you dont want to trigger the Alarms at every power up or after a mains failure/restart.

It may be necessary to add some external logic to the parallel port in order to prevent the Alarms from being triggered after a power up.

Let me know what you find and decide to do.:)

EDIT:
This Schedule1.exe will do what you are asking.

When called the exe will control the port pins ON for the entered period [ I have kept all 8 pins available for use]
Use Timer7 pin OFF time to terminate/close the program automatically.
If you uncheck the Auto Close box the program will stay visible for set up and test.

Lets know how it goes.
 

Attachments

  • Schedule1.exe
    62.5 KB · Views: 228
  • AAesp01.gif
    AAesp01.gif
    12.7 KB · Views: 419
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top