Physical Button press to kick off bat file. I'm new today Fri Apr 20 2018

Which forum do I need to go to?

I'm a 60 year old physical layer IT/IS Installer for my employer.

I have a need at work for our employees to momentarily press a GrayBar purchased outdoor weather-proof button that will execute c:\BounceVips.bat.

My need is that simple.


95% of the time our propitiatory software works, but 5% of the time our software freezes & I want to allow the employees to bounce the software back open from the bat file that works fine.

I don't want the employees to mess with a keyboard, or mouse. the employees will be inside a vehicle scanning a barcode to get a parking location from Vips. If Vips is frozen, then the driver can push the button mentioned above to bounce, aka reopen Vips. This will save time from contacting a supervisor, or waiting for IT to bounce the software remotely.

Can someone please point me in the right direction? Most likely there is something here already in a library I can look at - no need to re-invent the wheel, but I also know these nuggets of elementary education will be used again for something even more useful!

I purchased 2 small Pro Micro - 5V/16MHz DEV-12640 circuit boards online from sparkfun that will be here next week.

Advance thanks Jay.

After reading this, my eyes hurt :frowning:

95% of the time our propitiatory software :o
Vips :o
aka reopen Vips :o
bounce the software back open :o
nuggets of elementary education :o

60 year old :slight_smile: Welcome, youngster.

Flowery verbosity …

Why not ask your question using basic english and describe things in basic electronic terms.

  • Program the Pro Micros to emulate keystrokes of a keyboard shortcut that won't be used by any other program (something like Ctrl + Alt + Shift + B) when the button is pressed.
  • Right click on c:\BounceVips.bat.
  • Click on "Create shortcut".
  • Right click on the created shortcut.
  • Click "Properties"
  • Click the "Shortcut Key" field of the Properties dialog.
  • Press the shortcut key you programmed into your Pro Micro.
  • Click "OK"

For help with step 1, see:

OK, I assume you want to run this batch file from a DOS command line.

You could use a Sparkfun Pro Micro connected as a keyboard to the USB port on the PC, and the button connected (maybe via an optoisolator if it's a long cable run) to a digital input pin. A simple sketch to debounce the button, and then send the command string "c:\BounceVips.bat\r" to the keyboard USB. Note the escaping of the backslash, and the Return.

You might want to do a timeout so that if someone repeatedly presses the button, it doesn't generate a whole slew of commands - maybe 1 a minute, or 1 every 5 minutes max.

larryd:
After reading this, my eyes hurt :frowning:

Mine didn't :slight_smile:

Why not ask your question using basic english and describe things in basic electronic terms.

I actually understand quite well what he wants.

the employees will be inside a vehicle

Does the button need to be inside the vehicle?
How far is the button from the PC?
I assume the target PC is running windows?

You can send serial data from the arduino to the pc.

Use powershell to act on the incoming serial data.

See these links:
https://learn.sparkfun.com/tutorials/terminal-basics/command-line-windows-mac-linux

or run processing with the exec command

maybe also worth looking:

EDIT:
I overlooked that the sparkfun pro micro can actually act as keyboard, as mentioned above.
https://www.sparkfun.com/tutorials/337

This is might be an easier solution, depending on distance / wireless requirements.

These may help:

https://m.youtube.com/results?q=micro%20pro%20keyboard&sm=3

Thanks for all the replies folks!

LarryD, I should have included some Visine in my initial post - sorry!

Pert, Excellent post - I'm on it boss - step 1 is where I'll need help, maybe not, but I appreciate your steps & the links at the bottom - I think you've given exactly what I need.

Alexmonro, sure run from a command line, or I probably should take "BounceVips.bat" out of c:\ root and place somewhere within the path like c:\windows\system32. Some of your lingo is over my head, but I do plan on attaching the Pro Micro inside the PC living inside the scan station housing the PC - I was thinking about placing it inside a small .... small sunglass case zip tied inside the PC??, I need to solder the 2 switch wires "A1" and ground. O, O, I love your idea of placing a timeout in there for the button press happy folks that will undoubtedly press it repeatedly = EXCELLENT suggestion.

Hydrocontrol,

No.
3 feet.
Target PCs are Mainly Win7Pro, however I have some XPPro boxes still working scan stations, and a hand full of Win10Pro boxes.
Serial data?, my XP boxes have serial ports, but I'm hoping to interface thru a simple USB port, but if I can serial data thru a USB port, then yes, I can serial data to the arduino/ProMicro/small circuit board.

The button will be placed outside the vehicle on the permanent earth mounted scan station, but with-in an arm's length reach outside the driver's door window to the scanning enclosure mounted on the side of the scan station where associates/drivers normally will scan the Vin17 barcode by placing the barcode under the scan beam, I'll place the button right or left of the barcode entry slot. The button will be about 2-3 feet from the PC inside the cabinet. The scanning enclosure is attached to the side of the PC cabinet - I will look into posting a picture on your forum, if possible so as they say a picture is "worth a 1000 words" Yes the target PC is running Win7, however I still have some scan station out there running XP, and I have a few running Win10 - all Pro.

LarryD, Thanks for the links!

Ok folks, time for bed - I'll look at the links early this week.

jayindy:
Serial data?, my XP boxes have serial ports, but I'm hoping to interface thru a simple USB port, but if I can serial data thru a USB port, then yes, I can serial data to the arduino/ProMicro/small circuit board.

Yes, I meant serial through USB. Your ProMicro has a USB Port. I was actually thinking about sending serial data from ProMicro to PC, but the other direction from PC to ProMicro might also be useful. In this way, the PC could give feedback once the restarting of the Vips is successful. This feedback could then be passed on to the driver with a LED.

Which brings me to another question - I'm sure the button idea will work, but wouldn't it be more elegant if the PC itself realizes that the Vips software has crashed, and restarts Vips all by itself?
Maybe you have explored this idea already, and rejected it? Is there some life sign from Vips, which enables an external batch file to poll regularly whether Vips is alive or crashed?

Since it is proprietary software, maybe you actually have the means to modify it, include a watchdog, broadcast a regular life sign etc.?

How does the driver actually realize that Vips has crashed? Mabe the ProMicro can simulate a scan and detect the Vips crash, before the driver does?

jayindy:
the employees will be inside a vehicle scanning a barcode to get a parking location from Vip

That sounds like they are spying on someone. And I don't plan to help with invasions of privacy.

...R

Hydrocontrol, I like "passed on to the driver with a LED" = maybe for future, but for basic simple 1st step, I want to get the bat file kick off button working.

"...be more elegant...", I've tried to work with programmers for years to produce a self-healing Vips, their reply, or I should say they point their finger back to me, the physical layer installer, an unresponsive Vips is the result of a break in connectivity, or some physical connection failure. Could be, however I've seen Vips become unresponsive on office machines sharing the same 48 port switch as the SQL server. My scan stations might have 2, or 3 daisy changed switches in the mix, or airbridges between the production 48 port switch and my scan station, yes there is a greater chance for a connectivity break, but I like the thought of a self healing vips.

Instead of pointing fingers at each other I've decided to chase this physical button option.

I had thought about a sentinel bar-code that could be scanned to kick off the bat file, let it hang on a chain and the driver would simply grab and place under the scan beam to kick off bat file, but I'd have to have extra software running in the background to read the scan.

I can VPN/VNC to any of the scan stations remotely and when the Vips software freezes, I've always been able to bounce it back open & drivers can continue scanning. If there were a connection problem, then I would not be able to VPN/VNC to the scan station. You state..."Is there some life sign from Vips...", honestly, I don't know, I'd have to discuss with the programmers, and I'm trying to solve the problem w/o going to them at the moment, however you've given me intelligent questions to ask.

"...include a watchdog, broadcast a regular life sign..." = you've given me lingo I can talk with the programmers intelligently = thanks! I do setup ping watchdogs frequently for routers.

Btw, we are a new vehicle processor at car & truck plants. We maintain the new product that rolls off the assembly line out in open storage where Vips assigns the parking location, then days/weeks later the units/new product will be loaded for over rail, road, or water to reach the dealer near you.

"How does the driver actually realize that Vips has crashed?" = The driver scans the Vin17 barcode and a "bad vin" messages pops up on the PC's flat panel driver confirmation monitor, sometimes the message is "dbprocess dead", but when the driver sees "bad vin" driver knows to get with the shuttle van driver, van driver gets on the 2-way radio and calls someone in the office to VNC to the scan station PC & bounce Vips back to life so the drivers can continue scanning. On a good scan the display monitor will say "A-B-023", the driver needs to park the unit in yard A, row B, bay 23, By pressing the button the driver can bounce Vips himself/herself saving incredible amounts of time.

Robin2, I appreciate your reply, we're not spying, we are a business trying to make a fair profit by staying efficient.

jayindy:
Robin2, I appreciate your reply, we're not spying, we are a business trying to make a fair profit by staying efficient.

What is Vips?

Why would people be doing something to it inside a vehicle?

...R

R,

Vips, (Vehicle Inventory Processing System), is my employer's propitiatory software.

"Why would people be doing something to it inside a vehicle?" =

The employees drive new cars and trucks off the assembly line. With paper bar-codes provided by the plant that are inside the new vehicles the employees scan that bar-code by reaching out the driver's window and placing that paper bar-code under the scan beam of my installed Symbol DS9208 scanner. The driver then gets a 4" print that matches the location on the PC monitor that tells the employee driver where to park the new unit into a specific yard-row-bay location. A shuttle van picks up all the employees and they go back to the plant to p/u more vehicles as they come off the assembly line & the above process repeats.

Thank you. That makes things much clearer.

I had the image of a Private Eye skulking in the back of a van pretending to be a telephone maintenance engineer while he looked for evidence in a divorce case. :slight_smile:

...R

Looks like Pert nailed what you need in reply #2.

From the error messages you're getting, it looks as though vips is indeed the culprit and even if there were a momentary loss of connectivity, I'd expect it to be capable of recovering.

I'd suggest that you have the bounce batch file also log its usage to a file. If you can provide better evidence of the issue to the developers, they may take it more seriously.

R, = Glad you understand.

Wildbill, thanks for the reply & suggesting logging = excellent idea, I like it, yes more proof for going to programmers with.