[BangPypers] Industrial Control Systems in Python

Vishal vsapre80 at gmail.com
Mon Mar 26 14:29:39 CEST 2012


On Mon, Mar 26, 2012 at 1:30 PM, Noufal Ibrahim <noufal at nibrahim.net.in>wrote:

> Vishal <vsapre80 at gmail.com> writes:
>
>
> [...]
>
> > Noufal, I would like to use a regular x86 processor with Linux
> > (stripped down)...  to avoid recompiling Python itself...to avoid one
> > more variable in the entire process. What was the processor/OS
> > combination you mentioned earlier ?
>
> In my case, it was an ARM processor with a stripped down Linux kernel
> running busybox for basic userspace utilities. I cross compiled Python
> for ARM, got rid of most of the standard libraries and managed to
> squeeze it onto the device.
>
> The python was for a tiny server which listened over USB that acted as a
> kind of RPC server on the device. You could write code on your host
> machine and a module would translate that into JSON, send it over the
> wire to the device where this server would run the code and send back
> responses that were interpreted by the host library. We used it to test
> the device. You could say things like `device.ioctl(...)` and it would
> actually execute the ioctl on the device with the params you sent it.
>
> > Compiling the Python code to ST means, writing a compiler :))...which
> > will be a serious project in itself. and then I will loose all the
> > good things that come with Python.
>
> Not necessarily. How complicated is ST? I wrote a simple declarative
> config language that Python would compile into once. It was some ast
> tricks and I'd seriously consider it as an alternative if the target
> language was not too complex. But you're a better judge of the
> situation.  It's just something that occurred to me.
>
>
> --
> ~noufal
> http://nibrahim.net.in
>
> Cum tacent, clamant. When they are silent, they shout. -Cicero
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>

1)
The scenario you describe is very close to what we would like to
have...except that I wish to have an SBC running the actual control code in
Python and a small micro-controller board to manage peripherals like ADC
and PWM pins...that would translate to the control actions. These two talk
over wire, using some protocol...some request-response bytes structure that
we invent :))

Now the next thing is...what is busybox and can I use it in this case on
the SBC? and where to find such SBCs....
Any pointers... ?

the search continues :))

Recently I have realized that almost all problems in this world...are a
form of search...No wonder the company that mastered search is a "G"iant
now.

2)
Going the ST way is not recommended (BTW its called Structured
Text) ...because only a compiler will not be enough, we'll have to come up
with some way of debugging... It would be like creating a whole new
language.

-- 
Thanks and best regards,
Vishal Sapre

---
"Life is 10% how you make it, and 90% how you take it"
"बहुजन हिताय, बहुजन सुखाय (Benefit for most people, Happiness for most
people.)"
---
Please DONT print this email, unless you really need to. Save Energy &
Paper. Save the Earth.


More information about the BangPypers mailing list