Hi all
I also have the ER1 robot along with HAL. Unfortunately I was one of the unlucky ones who purchased the robot after they stopped giving out the Software Development Kit for early buyers. This would have allowed integration to their software a bit easier. What IS given to new buyers of the ER1 kit is an API interface (which can be tested using windows Telnet program) or via the Python language.
I've tried using the python language but its just too slow running on the EPIA Mini ITX. (I might have to upgrade to a P4 board instead). I've played about a bit with HAL to see how it can be integrated to the ER1 or to the outside world even.
The 1st is voice recognition. We all need to talk to our ER1's. Unfortunately, the standard windows voice recognition is not good enough. (Too many errors) I had to use dragon speech for HAL to recieve what I was trying to say. The problems I encountered can be seen on this board.
http://http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1221&SearchTerms=ER1 The final solution was to always say the name of your HAL before the command. This also stopped the mic picking up un-intentional sounds.
The next was to add script to the main brain to act on command responses. eg. (using the Hal_Brain_Editor>Tools>Main_Knowledge_Database_>Main_keyword_&_priority_brain editor) we teach it to recognize the text MOVE, then additional text FORWARD. Under random response1, we put in "ER1:N100:I will now move forward".
Now back to the scripting. We create some code to recognize the first 4 characters with "ER1:" in a response. This can will tell further scripting the proceeding text is a valid action command followed by reply text.
The next issue I seem to read about is external interfacing of HAL to the big wide world. My job is a control systems engineer designing control systems. Our company uses only Mitsubishi kit so I can only tell you how to interface HAL via this route. Any Mitsubishi hardware can be used from PLC's (Programmable Logic Controllers, Speed Inverters, Servo Drives, SCADA systems, CCLink, Profibus, ASI networks, ect..).
The best way is by example. Suppose we want to control our house electrical appliances using HAL. The key item is a a program from Mitsubishi called MXComponent. This is basically an ActiveX interfacing program allowing easy interfacing to the hardware.
We will use a FX series PLC with 8 digital inputs & 8 relay outputs.
A serial lead with a RS232 to RS422 converter connects the PC to PLC programming port. Thats it! The relay outputs on the PLC is good for about 5Amps. Anything bigger will need a larger slave relay.
The stripped down MXComponet code written to the HAL script would look something like this.
Function plcwrite(Devicenumber, Devicevalue)
' The ActEasyIF object is made.
Set ActCtrl = CreateObject("ActMulti.ActMLEasyIF")
' The value of a LogicalStationNumber is set in the property.
ActCtrl.ActLogicalStationNumber = 0
' The Open method is executed.
oret = ActCtrl.Open()
' Write to PLC Data register
wret = ActCtrl.WriteDeviceBlock(Devicenumber, 1, Devicevalue)
' Close the device
cret = ActCtrl.Close()
End Function
Now, if we wanted to write the value of 1 to data register D300, we simple call the function: plcwrite("D300",1) in our script.
In the PLC end, we can simple program up in ladder logic (very simple in ladder logic).
[= D300 k1]-------------------------------(X1)
This will switch on output1 when D300 contains the value of 1.
The possiblities is now only restricted to your imagination. eg. An off delay for the toilet extraction fan to switch off. Toggle switches, Dimmers, ect.
Additional functional modules such as extra I/O's, Analogue I/O's, PID controllers... the list is endless. (Blimey! I'm sounding like a salesman!)
Hope this is useful info for anyone wanting to use external controls.
(especially when mains voltages and heavy currents are concerned).
Kaf
Oh, here is some piccies of my ER1.
Download Attachment:
rob.zip110.02 KB