Sunspot
Controlling
the Aviosys IP9203 stepper motor controller
Objective
Control an Aviosys IP9203 stepper motor controller from a Linux bash script
- Use Blassic basic to prepare and then run a bash command
There is a useful Windows .exe program here - it uses UDP to talk to port 7070 of the control card
ipm9203_02.zip
Japanese site
http://www.moosoft.jp/index.php?option=com_content&view=article&id=45&Itemid=34
Google translation
http://translate.google.co.uk/translate?hl=en&sl=ja&u=http://moosoftjp.com/ippower.htm&ei=QtPfTPSPF4OKhQet37H-DA&sa=X&oi=translate&ct=result&resnum=3&ved=0CDAQ7gEwAg&prev=/search%3Fq%3Dmoosoft%2B9203%26hl%3Den%26biw%3D1296%26bih%3D694
I used Wireshark to sniff the LAN and see what the html form was requesting
I need to send
192.168.0.19/tgi/ioControl_M.tgi?PinNo=P5_M0&P50M_STEP=100&P50M_TIMER=1&P50M_TIMER_CNTL=0&Apply=Apply
So use the Linux bash script -
curl -d "PinNo=P5_M0&P50M_STEP=100&P50M_TIMER=1&P50M_TIMER_CNTL=0&Apply=Apply" 192.168.0.19/tgi/ioControl_M.tgi
This sets the values of the html POST form via a Linux command line
these set -
P50M_STEP=100
P50M_TIMER=1
P50M_TIMER_CNTL=0 for one way P50M_TIMER_CNTL=1 for the other
The Blassic program below takes 3 arguments
- step, timer, direction
and creates the string that a browser would normally send to the 9203 when filling in the form on the built in web page
#!/usr/sbin/blassic Step$ = PROGRAMARG$(1) 'Send the number of steps as the first argument - 10 100 etc ' next bit all on one line up to -
' so now ask bash to send this string out using curl SHELL s$
SYSTEM |
Please email me here
- if you have better information on the 9203 and especially if you can control the 9200 card on its own
Aviosys give very little data - the best I can find is here -