Author Topic: nano-10 for HMI based Motor speed control Application  (Read 14822 times)

roypthomas

  • Newbie
  • Posts: 18
  • I'm a llama!
    • View Profile
nano-10 for HMI based Motor speed control Application
« on: January 16, 2013, 12:23:58 AM »
I purchased nano 10 from singapore sales office. My project is to develop a demo PC based PID motor application.  I can use any HMI, to communicate with nano10.

1. Can I connect a 24VDC motor directly to PWM. will there be any back emf. what should be typical motor specification that I can connect directly without a motor driver?

2.  My aim is to measure the speed of the motor and control its speed using a PID control on nano 10's PWM output. I intent to connect the power supply of the motor direct to the PWM output of nano10. I am not sure whether this will work. if it works, I need to write the nano10 program to mesure the pulses from the encoder as the motor turns and calculate the err= current speed count- setpoint and send corresponding PWM signal to the motor.

3. For the visualization, Once the motor is able to control at setpoint set on the HMI and plot a trend chart to analyse the PId performace, what protocol and products can be used?

Since the singapore side technical support is unable to provide a solution, please advise the steps.

Roy Thomas

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:nano-10 for HMI based Motor speed control Application
« Reply #1 on: January 16, 2013, 09:14:58 AM »
How much current does your motor draw at full load? The Nano-10 is rated for 4A peak and 2A continuous which means that only small motors can be controlled directly by the PLC?s PWM output. The motor will need to be connected to the PLC the same way as the regular output load shown in Figure 1.6 in the Nano-10 User?s Manual

Back EMF can be bypassed using a free-wheeling (flyback) diode wired across the motor terminals in reversed bias (see Figure 1.5.3)

For larger motor you can increase the control current using a large external transistor as suggested in Figure 11.2

Encoder that can output 24V NPN signal can be connected to the PLC?s digit input and enable the PMON functions. PULSEFREQUENCY command can be used to read the frequency of incoming pulses from the encoder which gives you the speed information of the motor. You can then apply PID algorithm to fine tune the PWM output.

For HMI there are many SCADA type software on the market that can be used with the PLC as long as they support either the Modbus RTU protocol (via serial port) or the Modbus/TCP protocol (via the Ethernet).

You can also program the Nano-10 to capture the readings and write the data to a file in CSV format. The data file thus created can be uploaded to a FTP server using FTP protocol that the PLC supports. CSV file can be imported into an Excel spreadsheet directly which can then plot the chart. Nano-10 will need to be equipped with the FRAM-RTC-256 in order to create the data file (see http://www.tri-plc.com/framrtc2.htm)
« Last Edit: January 16, 2013, 10:17:39 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

roypthomas

  • Newbie
  • Posts: 18
  • I'm a llama!
    • View Profile
Re:nano-10 for HMI based Motor speed control Application
« Reply #2 on: January 17, 2013, 01:32:07 AM »
Thank you for your advise.

Could you provide some programming sample codes to measure the pulsefrequency for the PID and some scaling of PID output to PWM?

As for the SCADA, I am using cimplicity which support Modbus RTU. But I am not sure how to assign the device ID for the nano10 as slave ID assign the modbus address to "speed", P,I,D,"setpoint" variables in nano 10.

Could you also provide the "fwd" diode number to bypass back emf?


Anyway I can get a sample program for this. it would help a lot to demostrate.

Thank you.


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:nano-10 for HMI based Motor speed control Application
« Reply #3 on: January 17, 2013, 08:28:24 AM »
In case you are not aware, there are quite a lot of examples on the folder:  C:\TRiLOGI\TL6\usr\samples

An example for the PULSEFREQUENCY is the file:

PulseMeasurement.PC6

which can be found in the above folder.

The Modbus slave ID of the PLC is the same ID that you use to connect to the PLC using either TLServer of the F-server on the PLC. Default is 01 but you can change it either from TLServer "Serial Port Setup" or from i-TRiLOGI via "Get PLC Hardware Info".

The diode model depends on your current draw. The simplest such as 1N4001 or UF4001 can be used to handle 1A continuously and up to 30A pulse current.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

roypthomas

  • Newbie
  • Posts: 18
  • I'm a llama!
    • View Profile
Re:nano-10 for HMI based Motor speed control Application
« Reply #4 on: January 17, 2013, 04:38:11 PM »
The figure 8.1 shows a simple 24V signal NPN type optical sensor that can be connected to the PLC to measure the RPM.

Could you advise the model or part number that I can purchase?

Thanks

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:nano-10 for HMI based Motor speed control Application
« Reply #5 on: January 17, 2013, 08:42:46 PM »
Any sensor that can produce a clean ON when an obstacle placed in front of it and OFF when the obstacle is removed can be used. Companies such as Festo or Omron all sell these kind of sensors. You can contact your sensor supplier and tell them what you want to do and they should be able to suggest to you a model.

Another way is to use an optical encoder with 24V NPN output which you can connect to the PLC input and measure both the motion (counts) and the speed.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS