Open the X-Sim notifier or download it!
motion simulator DIY community Follow us on  Twitter Add to iGoogle
motion simulator DIY community

newby looks for plc and motioncontrollers

Community DIY motion simulator projects with X-Sim. Share your projects with reproduction hints and learn from others. Commercial projects are not welcome in this section. - Gemeinnützige DIY Bewegungssimulatoren Projekte mit X-Sim. Präsentiert hier eure Fortschritte inklusive Nachbau Tips und lernt von anderen. Kommerzielle Projekte sind hier nicht willkommen.

Moderator: egoexpress

on 26.03.2010, 23:28

Re: newby looks for plc and motioncontrollers

New postby Frakk on 26.03.2010, 23:28

From the above mentioned setup, all you need is the PID controller. How to use it? It will depend on the controller. Before you spend any money on equipment you really have to make sure it works, and make sure you know how to use it and tune the PID.

First, find out if you can turn your inverters into PID controllers with software, or an additional card. You already have a great advantage trying out different things, so just keep at it!
User avatar
Frakk
X-SIMER
 
Posts: 607
Joined: 15.04.2009, 19:57
Local time: 06.09.2010, 23:43
Obtained thanks: 100


on 27.03.2010, 07:15

Re: newby looks for plc and motioncontrollers

New postby kermit on 27.03.2010, 07:15

Hi, I need the inverters anyway I think, as the motors will be 220volts 3ph 50 hz and our home mains are 220Hz 1 ph.
Being able to purchase them at cost ,Its no problem.
I have taken some books home for study, about the inverters and drives.
Also we have 1024 bit shaft encoders at work, need to find out if they can be used
greetz
kermit
full member
 
Posts: 23
Joined: 12.02.2010, 02:23
Local time: 07.09.2010, 04:43
Obtained thanks: 0 time


on 27.03.2010, 17:15

Re: newby looks for plc and motioncontrollers

New postby egoexpress on 27.03.2010, 17:15

Encoders are a great thing, but imho not neccessary for a slow Cessna flightsim platform. As the levers on the gearhead just turn slowly and 180° max anyway, some single or mulit-turn pots (depending on where they get placed) should be sufficient.

Software PID calculation via PC is probably too slow. And I doubt that the TECO drives are capable of accepting some kind of firmware upgrade with PID code and encoder/pot input.
So you would have to come up with an own MC with PID code, or some kind of expensive PLC, which would require additional soft interface programming job, wich I doubt you would be able to write.

Or, you give it a try to use the cheap AMC motion controller with already integrated pot feedback position control with Tronicgr' analog output firmware, instead of PWM signal firmware.

Another possibility would be to use frequency inverters, that accept rectangular PWM input signal with matching frequency, and use the AMC as it is.

@Frakk
However, in case you want to tinker a PID motion controller on your own, you may find Tronicgr' thread about PID control useful perhaps.
He added some sample code for a basic stamp MC as well:
implementing-pid-control-in-microcontroller-t1011.html

But consider, that full PID and high-res decoders require a lot of calculation power to keep the cycle speed acceptable! The cycle speed is the reason why Tronicgr removed the integral and derivative calculations on his AMC.

regards
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3877
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 07.09.2010, 05:43
Obtained thanks: 252


on 27.03.2010, 18:05

Re: newby looks for plc and motioncontrollers

New postby kermit on 27.03.2010, 18:05

This is the one with a build in PID control, also they have CM 485 and CM232 interface also Modbus rtu
http://www.bonfiglioli.com/pdf/synplus/ ... YNPLUS.pdf
greetz
kermit
full member
 
Posts: 23
Joined: 12.02.2010, 02:23
Local time: 07.09.2010, 04:43
Obtained thanks: 0 time


on 27.03.2010, 19:14

Re: newby looks for plc and motioncontrollers

New postby egoexpress on 27.03.2010, 19:14

A frequency inverter with PID position control sounds pretty much like a turnkey solution. But unfortunately there are no PLC protocol plugins available for X-Sim so far afaik (besides that for the SCN5 actuators).

So it would be needed to translate the USO output data into something Modbus compatible.
The USO string looks like the following:

(8 bit XSim output values)
AB~255~~a01~~a02~~a03~
or
(16 bit XSim output values)
AB~65535~~a01~~a02~~a03~
or
(32 bit XSim output values)
AB~4298769224~~a01~~a02~~a03~

while 'a#' are the axis position variables, and the 'AB' constant can be replaced with whatever term you need to use as a start command in the command string.

X-Sim USO documentation:
http://www.x-simulator.de/beta/uso.html

Perhaps you'll find a collegue, who could make it work?



The pdf does not say what type of feedback devices (encoders or pots) the inverter would support in a PID setup, and which resolution it provides.

Regards
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3877
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 07.09.2010, 05:43
Obtained thanks: 252


on 27.03.2010, 19:31

Re: newby looks for plc and motioncontrollers

New postby egoexpress on 27.03.2010, 19:31

Btw, MboRacing connected X-Sim to a Siemens S7 PLC.
post14868.html#p14868
(Never mind the slow S7 display refresh rate)
Perhaps he can help you a bit if you asked him.

reagards
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3877
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 07.09.2010, 05:43
Obtained thanks: 252


on 27.03.2010, 20:03

Re: newby looks for plc and motioncontrollers

New postby Frakk on 27.03.2010, 20:03

Great find kermit! A phase inverter with built-in PID is a great solution, given the price is reasonable. Modbus is just a protocol for multiple endpoint serial communications. The USO can be configured to work with it, I don't think any other plugin is needed. Here is some details, and also you can see the frame formats:
http://en.wikipedia.org/wiki/Modbus

The main advantage of encoders is their noise immunity. When you have a potentiometer for position feedback, the analog signal wire will be very sensitive to EMI and cause the feedback signal unstable, especially with large AC motors nearby. The resulting effect will be a shaking simulator, how bad it shakes depends on the amplitude of noise. Extra care must be taken, proper routing and shielding of the wire is an absolute must.

Thanks for the suggestion ego, I have read Thanos' thread about PID. I have lots of extra material both for PLC and micro controller implementations of PID control. The theory is actually a lot simpler than it looks, the hardest part is writing an efficient and precise firmware and tuning the gain values for individual setups.

Would you say 10ms cycle period / 100Hz refresh rate is fast enough? It is easily doable with an AVR running on 10-14Mhz. The problem comes when the controller has to do other things such as LCD display, serial communications, servo controls, etc. I know Thanos used BASCOM to write and compile the firmware, probably not the fastest. Most of the libraries used to control the LCD's are not very efficient, they waste a lot of CPU time between commands, especially used in 4bit mode.

With a properly coded and compiled firmware it is not difficult to achieve 100 cycles/sec. Programming in assembly can be a lot faster, but that is very tedious and time consuming.
User avatar
Frakk
X-SIMER
 
Posts: 607
Joined: 15.04.2009, 19:57
Local time: 06.09.2010, 23:43
Obtained thanks: 100


on 27.03.2010, 21:48

Re: newby looks for plc and motioncontrollers

New postby kermit on 27.03.2010, 21:48

Hi Frakk,
Yes and it`s ours too
Do you mean that I could plug the inverter straight into the USO and roll or bank?( but how will I connect the other one for a 2 dof )
As mentioned before we use 1024 bit shaft encoders wich can be
coupled to get 2048 bit. (don`t know how I`m just building things others are programming them in to inverters.)
Or am I thinking to easy about the stuff,
Will I damage the inverter if I will try to set it up,
by plugging it straight in to the USO.
And see what it does?
regards Henk
note
http://www.bonfiglioliusa.com/Products/ ... BE-61.html
This is the one we us in our winches and capstans, but they are out of scope I think
kermit
full member
 
Posts: 23
Joined: 12.02.2010, 02:23
Local time: 07.09.2010, 04:43
Obtained thanks: 0 time


on 04.04.2010, 16:17

Re: newby looks for plc and motioncontrollers

New postby egoexpress on 04.04.2010, 16:17

kermit wrote:Do you mean that I could plug the inverter straight into the USO and roll or bank?( but how will I connect the other one for a 2 dof )
As mentioned before we use 1024 bit shaft encoders wich can be
coupled to get 2048 bit. (don`t know how I`m just building things others are programming them in to inverters.)
Or am I thinking to easy about the stuff,
Will I damage the inverter if I will try to set it up,
by plugging it straight in to the USO.
And see what it does?
regards Henk
note
http://www.bonfiglioliusa.com/Products/ ... BE-61.html
This is the one we us in our winches and capstans, but they are out of scope I think


Using a serial connection (USO) requires one COM-port per axis in your case. For 3 axis you need 3 COM-ports (with USB->serial converters you can use 3 USB Ports instead of hardware COM-ports).

The inverters shut down automatically in case of hardware or programming failure. So as long as you dont connect a 220V wire to the serial port, you will be safe. It simply works, or not. So you can safely try to get it working.
If you have doubts still, then you should confirm the issue with your hardware supplier.

@Frakk
10ms is average leaning to good I'd say. Nothing bad, but nothing really good.
3-5ms would be better.
Probably it would be better to use several microprocessors to split up the work, instead of using just a single one like on the AMC. Though Thanos is working on replacing the current ATmega on his AMC with a bigger and more potent one for additional axis/functions, the decoder job for 16/32bit quadrature encoders is too performance consumpting for a single ATmega mc still.
If you are interested to talk about that, you should open a new/dedicated thread for this issue.

Regards
User avatar
egoexpress
X-Sim Community Admin
 
Posts: 3877
Joined: 13.12.2006, 14:26
Location:Germany Germany - Frankfurt/M
Local time: 07.09.2010, 05:43
Obtained thanks: 252


Previous

Return to DIY motion simulator projects


Social Bookmarking
Bookmark bei: Mr. Wong Bookmark bei: Del.icio.us Bookmark bei: Webnews Bookmark bei: Icio Bookmark bei: Oneview Bookmark bei: Linkarena Bookmark bei: Newskick Bookmark bei: Folkd Bookmark bei: Yigg Bookmark bei: Digg Bookmark bei: Reddit Bookmark bei: Simpy Bookmark bei: StumbleUpon Bookmark bei: Slashdot Bookmark bei: Netscape Bookmark bei: Furl Bookmark bei: Yahoo Bookmark bei: Spurl Bookmark bei: Google Bookmark bei: Blinklist Bookmark bei: Blogmarks Bookmark bei: Diigo Bookmark bei: Technorati Bookmark bei: Newsvine Bookmark bei: Blinkbits Bookmark bei: Ma.Gnolia Bookmark bei: Smarking Bookmark bei: Netvouz

Who is online

Users browsing this forum: No registered users and 0 guests