Build Your Own Arcade Controls Forum
Front End Support => MaLa Frontend => Topic started by: weisshaupt on March 11, 2008, 10:53:45 pm
-
Okay, I think I am now ready to ask for Beta Testers of this software, with the normal disclaimes that I am not responsible for any damage this does to your machine, use at your own risk etc, etc, I tested it in my own rig and nothing bad has happened. Only XP is supported at the moment.
The Plugin has the following features:
1) A Default mode compatibile with enclosed wiring Diagram and Solarbotics Secret Motor Driver PCB and GM series Motors (great for LCD not so great for anything else) This can be easily adapted to run Higher power H-Bridges and motors for those who want to move their CRT.
2) Ability to set up High or Low Limit Switch logic (the default logic is a Hybrid where both switches are High or low when a rotational extreme is reached)
3) Support for rotation based on Horiztonal/Vertical information when a Game is selected, or based on manual selection of an aspect in mala
4) Support for switching between any/all aspects of 0, 90,180 and 270 degrees as supported by MALA
5) PWM based speed control... still a little jerky, but I think adequate. Can do PWM on the Input Leads or using a separate Enable line
6) Ability to send Degaussing or Monitor Off/On pulses
7) Ability to use different pins for input and output as desired.
In general, I tried to provide something robust enough that anyone trying to use a motor to rotate a monitor would be able to do so automatically from MALA. I plan to release a console/command line driven version of the utility as well, and I amy even deliver it as an installer package if I can figure out how to do so.
VC++ Source code is available on request, and its Crap. Worst code I ever wrote in my life, but it appears to work at the moment. If anyone is interested in having a look and fixing it, I am more than glad to have them teach me how to do it properly.
Anyway, if you are insterested in Beta Testing this, PM me..
If you are just thinking about it - you can check out the read-me here
https://share.adobe.com/adc/document.do?docid=9cc311ea-f04d-11dc-8f41-4398683682eb (https://share.adobe.com/adc/document.do?docid=9cc311ea-f04d-11dc-8f41-4398683682eb)
-
Effing sweet dude!!! I'm all over this once I get some time to build... hopefully this weekend. So all you do is add the plug-in to MaLa and the software does the rest based on the game selected? Unbelievable!!! :cheers:
-
Your documentation, once again, was way more then ever expected. Thanks so much for contributing this to the community!
-csa
-
Effing sweet dude!!! I'm all over this once I get some time to build... hopefully this weekend. So all you do is add the plug-in to MaLa and the software does the rest based on the game selected? Unbelievable!!! :cheers:
Well, load the PLugin, put another DLL where its supposed to go, and then load the Microsoft C++ runtime libraries, then yes, Mala will then turn on and read/send to the Parallel port so the cable you built to the Secret motor driver and switches you set up according to the diagram in the read me ( now posted) will work to turn the motor which hopefully will move the monitor..
I wish it was as simple as loading the software :>) DaOld Man promised to help me with a distributable package and I still want to tweak the PWM a bit, but I think its useable now.. I haven't had time to design or check into manufacturing a premade mount/driver/motor yet... I guess I don't have enough ot an entrepenurial spirit..
-
Very nice!
Nice documentation - something I've always been weak on.
FWIW, you can set the options in VC to inlclude the necessary runtime components - it will increase the size of the .dll but no extra install of the runtime library will be necessary. I cant remember the setting change off the top of my head, I'll check it when I get home.
Also, if you want to make a simple self installing package, check out the iexpress utility built into XP. (just run iexpress from the cmd line)
I actually had finished my own MALA plugin to do the same stuff, except I ripped out my PWM implementation as I wasn't happy with it (not smooth enough IMO) , and stalled creating a GUI to configure all the options. I am totally not a windows programmer, so dealing with the UI portion from within the MALA framework was a little more adventuresome than I thought it might be. (I'm sure it's probably simple - anyone got any suggested references? I was using the free VC++ you can dl from Msoft, and the standard VC mala plugin templates)
I'd love to try out your plugin, and take a look at your code to see how you implemented the PWM timers if you don't mind.
Great job!
Koz
-
Hey there Koz319, long time no see. hope everything has been good for you.
I agree, Weisshaupt is doing a knock-down-drag-out job!!!
-
Weisshaupt, I cant find the config file your program is supposed to make on first run. im sure Im doing something wrong..
-
If the plugin runs, (which of course requires that the Runtime Libraries be loaded and that you be using an XP machine) it will show up in the PLugin listing within Mala. If it doesn't then makes sure all the DLLs are loaded..
If it does show up in the plugin listing, it SHOULD create malarotate.cfg in the same directory as Mala.exe. If the config file isn't there, the program uses the defaults (But you need to change them)
I can't think as to why the plug in would NOT be creating that file .. you can of course create on by hand
parm= value * comment
is the format. It SHOULD be case insensitive. You may want to turn logs on-- that will create rotateevents.log and that will let you et what the Parms read were (if they were read at all)
-
Extracted conversation from Project Announcements for organizational purposes:
My only concern is the PMW isn't completely smooth yet. I wanted to return to the code and figure how to up the prioirty of the thread, but haven't done so yet. Otherwise I THINK it should work. Mine works strobing the regular inputs and not the enable. The enable SHOULD work though, but my test here was pretty cursory.
For the intial tests you might just make the timout very short. The program will put the motor into "brake mode" when it reaches the timeout-- no matter what switches are pressed. or you can put a switch on the enable lead. If that is low, the chip is off and the motor won't respond to anything the PC tells it to do.
If one was to set the timeout to say zero, would the program bypass pulsing all together? If not, might want to consider adding logic for that, or having the value of say -1 shut it off all together.
When something is "low", does that mean "not connected", as in open circuit? Also, if we're playing according to colors.. what color is the enable wire, yellow? A switch on this wire disables rotation all together.. or only pc instruction (aka pulsing)
Thanks again!
-csa
-
Extracted conversation from Project Announcements for organizational purposes:
My only concern is the PMW isn't completely smooth yet. I wanted to return to the code and figure how to up the prioirty of the thread, but haven't done so yet. Otherwise I THINK it should work. Mine works strobing the regular inputs and not the enable. The enable SHOULD work though, but my test here was pretty cursory.
For the intial tests you might just make the timout very short. The program will put the motor into "brake mode" when it reaches the timeout-- no matter what switches are pressed. or you can put a switch on the enable lead. If that is low, the chip is off and the motor won't respond to anything the PC tells it to do.
If one was to set the timeout to say zero, would the program bypass pulsing all together? If not, might want to consider adding logic for that, or having the value of say -1 shut it off all together.
When something is "low", does that mean "not connected", as in open circuit? Also, if we're playing according to colors.. what color is the enable wire, yellow? A switch on this wire disables rotation all together.. or only pc instruction (aka pulsing)
Thanks again!
-csa
Hey csa,
The Timeout is how long the program should TRY to turn the monitor till it hits a switch. If you set it to 0, it will never try.
If you set the PWM periods to 0, it will NOT try to pulse anything, but will just leave the thing set with the CCWBYTE and the CWBYTE values, and the motor should run full bore. You can also set the Speed to 100 and the Same thing will happen. Take a look at thge flowchart in the readme to get a better idea how this all works
The Enable is the yellow wire if you followed solarbotics instructions. For doing PWM, you CAN just solder that to the +5v and it will stay on all of the time. The PWM is then done by simply turning the actual inputs on and off - which is the default mode. Using the separate enable is an advanced mode and you have to set all of the bytes in the config file so that pin 4(or whatever) will turn on when we want the motor to move, and turn off when we don't.
The Device is LOW when an input is tied to ground. However, the parallel port can be damage if probugh directly to low WITHOUT a current limiting resistor. If its Not connected, different circuits will "float" either high or low. Simply disconnecting the yellow wire via a switch will disable the chip, as it need a good strong high (+5v) signal there. In reality, I don't think you really need this. You can always just pull the DB25 cable from the printer port and stop it if you really need to.
-
Thanks weisshaupt for the reply. I didn't think about just disconnecting the Ethernet disconnect.. duh! I think I still might wire some sort of emergency cut off switch accessible from the front of the cab so if anything goes bad, I don't have to scramble in back of the cab to fix it.
Seems like everything I need is in the device all ready. I've got the rig mounted now, hopefully next weekend I'll have power wired to the cab finally and get the computer in there as well. I appreciate the info, and will keep you posted.
-csa
-
I'm looking into putting a rotating monitor machine together. And was wondering if you can give me some examples of servo motors to use and their connection to the secret drive? I'm planning to use a arcade crt monitor that I'll balance in the cabinet. So I guess if it's balanced it won't take a very powerful drive.
-
I'm looking into putting a rotating monitor machine together. And was wondering if you can give me some examples of servo motors to use and their connection to the secret drive? I'm planning to use a arcade crt monitor that I'll balance in the cabinet. So I guess if it's balanced it won't take a very powerful drive.
The plugin can be used to turn anything, but sadly I don't have any experience with doing a CRT system. Mine is LCD based. COrnchip did a very nice one, and DaOldMan is working on one currently. IT seems people like to use Power Window motors for a car... of course once you use something that big, you need to basically build your own H-Bridge to drive it. The Secret motor driver will only drive up to 600MA.. which probably won't be enough to move a CRT..
-
COrnchip did a very nice one, and DaOldMan is working on one currently.
FYI
DaOldMan is doing great things in this area. I have checked some of his early beta work recently. :-)
-
FYI
DaOldMan is doing great things in this area. I have checked some of his early beta work recently. :-)
Why thank you Loadman...
Incidentally, I have a rotate program ready, if anyone wants it. Loadman developed a mala plugin to call my program.
Here is a screen one screen shot.
It has the ability to choose any outputs as CW and CCW.
Also inputs and time limits.
You can also assign a stop button, and Im working on lighting some LEDs. (This part is not finished yet.)
I do not have speed control, because I dont think I will need it.
-
If you are developing a rotate drive, i highly suggest you use a program I developed (with Loadmans help).
You can turn on outputs and monitor inputs.
YOu can also play around with speed control.
Here is a screen shot or two, and the program, if you want it.
(This program needs inpout32.dll )
-
Does this mean one could use this only for timely turning on a monitor?
-
Im not sure I understand what you mean..
-
Im not sure I understand what you mean..
I mean for turning on the monitor when the fe loads. ArcadeOS has something like this, where once the 15khz video mode is being displayed, it turns the monitor on (via the parallel port). Although, perhaps this MaLa plug-in could do that or be timer-set?
-
Im not sure I understand what you mean..
I mean for turning on the monitor when the fe loads. ArcadeOS has something like this, where once the 15khz video mode is being displayed, it turns the monitor on (via the parallel port). Although, perhaps this MaLa plug-in could do that or be timer-set?
I'm sure DaOld Man could whip up such a plug-in soonish.. ;)
-
Well, I threw together this small app.
It is an executable that you would run instead of mala.
First time you run it, you have to set it up, bay entering path and exe of mala (or whatever program you wish to run).
Also you need to tell it which output pin to use and the printer port address.
Next time you run it it should work.
When you run this file, it should turn on specified output pin, then start mala. (or whatever frontend you tell it to.)
You can edit the setup file, monmndr.set, or run setup again by entering the command monmind 1
You will need inpout32.dll in the windows\system32 folder.
You will also need a 5 VDC solid state relay attached to pin 25 (-) and any pin between 2 and 9 of the printer port.
The solid state relay will turn on the monitor. (Must be solid state, unless you use an opto isolator or transistor to turn on relay).
I threw this together real fast, so it may need debugging. I can post the source code if you want it .
You may have to enter the printer port address is decimal. The calculator in Windows can convert between hex and decimal.
And remember, wiring things to your printer port can be hazardous to your puter... so use at your own risk.
Have fun...
-
Thank you. I'll see what I come up with, though I bet someone else probably will first.
-
I found a bug in the monitor minder program (monmind.exe).
I have uploaded the fixed version in the post above.
If you have downloaded it already, please download it again and replace the first one with this one.
If you need a diagram showing how to hook a relay to the monitor, let me know..
BTW, I'm working on a mala plugin that will do the same as monmind, but it may take me awhile. Im new to programming in Delphi.
-
If you are developing a rotate drive, i highly suggest you use a program I developed (with Loadmans help).
You can turn on outputs and monitor inputs.
YOu can also play around with speed control.
Here is a screen shot or two, and the program, if you want it.
(This program needs inpout32.dll )
XP Users, you'll need to probably install MSComCT2.OCX (attached) using the following instructions:
1. Download the attached zip file
2. Extract MSComCT2.OCX to your C:\Windows\System32 directory
3. Click on the Windows "Start" button and then click on "Run"
4. Type the following command in the run box to register this library file:
regsvr32 \windows\system32\MSCOMCT2.OCX
5. You should see a message saying "DllRegisterServer ... succeeded"
6. Run the program and enjoy!
Hope this helps
-csa
-
Oh goodie! More problems with my super fabulous KeyWiz uploader! Anyone want to buy it from me (http://forum.arcadecontrols.com/index.php?topic=88069.0).. cheap? I am going to smash it soon for real.
If anyone has issues with Weisshaupt's beta rotating program, disable MaLa from using the KeyWiz uploader in the Encoder section *AND* Don't allow the KeyWiz uploader to launch MaLa after it uploads the custom key set. As a matter of fact, don't let the KeyWiz uploader touch any part of MaLa. They hate each other.
Maybe it's the implementation of of the spawned thread, but whatever the case, removing the keywiz uploader from Mala completely allows the rotating plugin work as designed.
-
So I've successfully achieved pulse modulated rotation using Weisshaupt's plugin. I wired it according to the Advanced Setup #3. Do make sure you read his PDF like 5 times, making the config file was a bit tricky. I'll post mine here in a bit to hopefully help others. Also don't feel stupid when doing so, I had to reverse the motor leads and swap the CW and CCW switches around a bunch of times until I got the rotation directions correct. A multimeter is your friend.
One "bug" I found on my system, is that all the register decimal numbers which control the stopping of the limit switches differed by a value of 1 from the numbers referenced in the config documentation. For instance, the default settings for breaking in normal wired setup (non-pulse) were written as "127". When I turned on logging I discovered my register was reporting values of "126". When I wired for pulse modulation, the same held true, as the stop value default was written as "79" when my system was reporting back a value of "78". Thankfully, you can override the default values in the config file if you experience similar problems.
DaOldMan's PrintPortTester.exe (http://forum.arcadecontrols.com/index.php?topic=77724.msg832888#msg832888) validated this, so anyone looking into things should consider installing his program as well. Remember to install MSCOMCT2.OCX (http://forum.arcadecontrols.com/index.php?topic=77724.msg929139#msg929139) if you are running Windows XP.
Hopefully I'll have pictoral updates shortly.
-csa
-
Man it seems like forever since we were all working on rotating monitors..
Chris, you got me thinking of this again!
How's mrotate2 working out for you?
-
Man it seems like forever since we were all working on rotating monitors..
Chris, you got me thinking of this again!
How's mrotate2 working out for you?
Ha, no kidding!
Mrotate2 seems good so far. I'll need to go ahead and rewire using the transistor setup we discussed last week. Your exe has no means of detecting when a limit is reached using Weisshaupts wiring scheme. On a good note, i've verified that pulsing the enable (pin4) works. Also of note is that an issued command fails if the setup is open.. might want to catch this case and warn the user.
More to come after the rewire!
-csa
-
Man it seems like forever since we were all working on rotating monitors..
Chris, you got me thinking of this again!
How's mrotate2 working out for you?
Just a public update, mrotate2 is coming along nicely! Hopefully we stir up the community to let those monitors spin like the wheels on my Escalade. :afro:
-csa
-
Cool,
When you are done please upload it to malafe.net
http://www.malafe.net/index.php?page=plugins&subpage=upload (http://www.malafe.net/index.php?page=plugins&subpage=upload)
-
Cool,
When you are done please upload it to malafe.net
http://www.malafe.net/index.php?page=plugins&subpage=upload (http://www.malafe.net/index.php?page=plugins&subpage=upload)
Will do. In the meantime, hope my assault on errors pertaining to screen orientation (http://forum.arcadecontrols.com/index.php?topic=88650.0) haven't left you with bitter beer face :) This problem is also persistent with the new plug-in being developed by DaOldMan.
-csa
-
Relax,
It will be ok..... soonish :cheers:
-
Relax,
It will be ok..... soonish :cheers:
Awesome. I love soonish, preferably in a dark lager.
-csa