Connecting weighing scales to Revolution

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Connecting weighing scales to Revolution

Post by Glenn Boyce » Mon May 03, 2010 7:27 am

I want to connect a set of weighing scales to a small application I have written in Rev. I thought before I started it would be best to do a little research as I haven't done this before. What should I read up on in Rev docs and perhaps externally?
cheers

Glenn

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Connecting weighing scales to Revolution

Post by Mark » Mon May 03, 2010 11:04 am

Glenn,

Buy electronic scales with a USB port and support for Mac OS X. Make sure that AppleScript is supported or that a command line utility is provided (preferably with the source code).

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: Connecting weighing scales to Revolution

Post by dunbarx » Mon May 03, 2010 7:14 pm

Another way, more expensive but much more fun. is to get a "service USB" device fro:

http://bkohg.com/index_e.html

It will become a new hobby.

Craig Newman

Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Re: Connecting weighing scales to Revolution

Post by Glenn Boyce » Mon May 03, 2010 11:41 pm

Hmmmmmm. Thanks guys. BUT unfortunately what I've got is an existing set of scales with an RS232 output, a manual that I don't understand at this point in time and I'll be connecting it to a windows PC. I've managed to almost master MIDI connectivity and figure this can't be that much different!! I was hoping the scales would have a USB output but they are just too old.

dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 118
Joined: Wed Apr 08, 2009 11:54 pm

Re: Connecting weighing scales to Revolution

Post by dickey » Tue May 25, 2010 11:56 pm

Hello Glenn,

Having just started watching the forum after a couple of weeks break, I noticed your post.

I have a factory and had to do this last year with a series of scales (drum, platform and product scales) all with RS232 output.

The first step is to purchase a RS232 to USB converter cable as most PCs don't do RS232. Get a long one if you can - my first effort was too short.

Then look up the manufacturer of your scales, they usually have some downloadable examples of pushing a button (on the keyboard or on the scales themselves) to fire off the measure to either a text file, database, or post to a web page. I liked the database idea, and then had my Rev program poll the database every 3 seconds for the weight measurement, then had an operator key or select some params like job and product numbers before confirming on my QA system. Over time we were able to script the whole thing so that the operator starts a production run (say to manufacture 100 widgets), the weights fire to the db automatically, and when the operator hits the batch target a light goes on to halt further work. The operator check counts, and the job is passed to QA for final inspection.

It was a pain at the time, but man the difference it made in the end was breathtaking.

I hope that helps.

Kind regards, Andrew

Post Reply