1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

newby looks for plc and motioncontrollers

Discussion in 'Motor actuators and drivers' started by kermit, Feb 12, 2010.

  1. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    As of now the firmware controls only 2 axis on the AMC. It is a P only PID controller with a PWM actuator output. Your setpoint comes from the USO, the loop is closed with an analog input (potentiometer) for your position feedback.

    What type of signals do you need for your motor drive? If you can do it with a PLC for a reasonable price it is an option. The AMC can be used for 2 axis if the PWM output is good for the inverter, and the pots for position.

    For the triangle setup all the math have to be calculated somewhere. The easiest way is in software, then output the synchronized actuator positions directly. Other way is to have the controller do it, it will be faster but there needs to be a suitable firmware and circuit.

    If you are thinking about using a microcontroller I might be able to help. I have been planning on a PID controller but things keep me delaying it. Maybe I just need someone to push. :D
  2. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
  3. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi, I have spend many hours just searching for solutions,looking on website trying to get more info
    But It seems that the majority of the motion platforms that are\being build, are using 24-48 volts motors.
    Looking back at this topic.
    Can I use the Velleman K8061 card inconjuction with teco E2 or simular to drive 220vac motors and profiler 2.0
    Will I have reversible motor direction and position-indicators?
    Please explain in newby language not in professional language because its all ga ga for me. :sos: :sos: :sos:
    will I have 2 or 3 DOF.
    My co workers are getting a bit offset of all the questions I have
    greetz
  4. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Page 7 of the datasheet shows you the inputs.

    You need 3 control lines. FWD/REV digital inputs to set your direction (terminal 3 and 4), Analog input (V/I in, terminal 9) for the speed of the motor.
    If you have the phase inverter, you can easily test it with a potentiometer for speed, and two switches (or just wires connecting/not connecting) for your direction.

    Now, how do you get all this information to your motors?

    First of all, you will get a POSITION data from the Profiler and not speed.
    I assume you are familiar with PID (Proportional / Integral / Derivative) control, if not, you should do a quick search in google and read about it.

    It is obvious if you want to control position, you need some sort of position feedback, the actual position/angle of your cockpit.
    From this position feedback (controlled variable) and your G-force data, in other words position you want to be in (setpoint) you know the Error in the position.
    Ideally you want this error to be 0, you want your seat to be in the exact position you receive from the Profiler all the time.

    This is where the PID control will move your motor in the required direction to make that error 0- the smallest possible.

    Here is a thread that might be useful for you to read:
    viewtopic.php?f=22&t=1707&p=22848&hilit=#22848

    USO serial output -> AMC -> PWM out -> Velleman DAC -> Phase Inverter analog in
    AMC -> Digital Direction outputs -> Phase Inverter Direction in
    Feedback potentiometer -> AMC analog in

    I recommended the AMC because he already has the Digital-to-Analog converter velleman card.

    In your case, it would be easier and cheaper to have only one control card:

    Profiler -> (USO serial output - position information) -> PID Controller -> (Analog speed signal (Voltage or Current) + 2 digital direction signals) -> Teco E2 phase inverter -> AC motor
    Position feedback -> (Analog or Digital signal) -> PID Controller

    For the PID controller a PLC would be perfectly suited, but really expensive. A simple microcontroller based circuit would be the ideal choice.


    Note:
    Full PID control is not necessary, but it will give the fastest and most accurate results.
    The AMC is a Proportional only controller as I stated before, and it works well.

    Hope it was newby enough language :)
  5. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    Unfortunately the TECO drive requires SPWM (sinusoidal pulse width modulation) input, which is different to the rectangular PWM the AMC puts out. So the AMC most likely wont be suitable to put out a TECO drive compatible PWM :(

    But you could use the AMC in analog mode.
    For more specific questions, it probably would be best, to ask him directly.

    regards
  6. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi,
    As it seems these inverters can be kitted out with PID control internal ,using a second Bus?
    greetz
  7. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    ego, the SPWM is a method to control the AC motors, hence it is the output of the inverter. Page 7 describes the control circuitry, the inputs to the inverter.

    What do you mean kermit by kitted out and second bus?

    It would be very nice to have analog outputs on the AMC!
  8. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi,
    It is al ga ga to me also
    the second bus will have 0-10 volt
    where 5 volts will be neutral or 0
    I think he means second circuit
    Kitted out means extra parts/software installed on the inverter
  9. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    I don't know if you can modify the software to make it a PID controller, you need position feedback for that. It would be great tho!
  10. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    As I understand a potmeter or encoder can be used in the setup.
    But a lot of professinal phrases has been used of wich I don`t understand myself

    But before purchasing, I need to know if and How I ca use our frequentie inverters with the set up mentioned below

    Profiler -> (USO serial output - position information) -> PID Controller -> (Analog speed signal (Voltage or Current) + 2 digital direction signals) -> Teco E2 phase inverter -> AC motor
    Position feedback -> (Analog or Digital signal) -> PID Controller

    For now I just collected a wormwheel gearbox and looking for a forgotten motor in the racks
    The inverter can drive a 230 3 ph 1,5 kw motor
    but start with a 1,1 kw and see if its sufficient enough to do what I want it to do .
    Its is still experimental a phrase I use at work to allow me to try different motor /gearbox setups without costing me an arm and a leg
    greetz
    greetz
  11. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    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!
  12. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    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
  13. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    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
  14. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
  15. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    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
  16. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    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
  17. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    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.
  18. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    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
  19. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +7 / 1 / -0
    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
  20. kermit

    kermit Member

    Joined:
    Feb 12, 2010
    Messages:
    34
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi,
    Sadly,I have been let go , and had to change jobs.
    But before that,
    I managed to collect my ac motors/gearboxes and the needed inverters(synplus),
    I have them mounted on my platform , but now I`m stuck.
    want to use a Velleman K8055 interface card , I know that some people know how to connect them ,
    I have tried to contact them but with no luck.

    The velleman card wich connect to the Pc using usb does have PMW and DAC outputs(0-5 volts) en can use potentiometers for bank and roll inputs.

    With the velleman testing software, I can see changing values when I rotate the disk on the potmeter.
    Also I can see changing values when using Jimms page software, so the card is oke.

    For now I dont know how to connect the velleman card to the inverters,
    I have tried with pmw and dac outputs ,
    but the inverters dont react to the inputs when using FSX with Jimms Page software.
    Does anyone knows how to connect them
    regards Henk