Author Topic: Stepper pulse and EOL  (Read 11969 times)

Ken111

  • Guest
Stepper pulse and EOL
« on: April 17, 2005, 11:06:24 PM »
The maximum pulse generated by the stepper output is approximated to 20000/sec for one channel if i'm not wrong. But what if i set the command as stepspeed 1, 50000, 20. Tried it before and it works. Wonder why. does it mean the whole process will be more than 1 sec?
Another question is how do i give a text file an end-of-line command? can i give the textfile an end of line command so that remaining data from DM is written to a new line instead of being seperated by a " "?
Regards

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Stepper pulse and EOL
« Reply #1 on: April 18, 2005, 11:42:56 AM »
The TRiLOGI software does not prevent you from setting a speed higher than the maximum stepper pulse generator. This is because TRiLOGI could be used in future for programming more advanced PLC that could support higher baud rate. So the software does not limit what you set. But if you set it higher than the maximum stepping rate the PLC will just be spending most of the time sending out stepper pulses at whatever maximum speed it can handle. In fact, at 20000 pps the waveform is not very square and some stepper drivers does not take it well. You should limit the maximum stepping rate to below 14000 bps for most steppers to work.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Ken111

  • Guest
Re:Stepper pulse and EOL
« Reply #2 on: April 21, 2005, 07:19:37 PM »
I'm actually trying to use the plc to control a servo motor via a servo driver. The pulse to the driver is amplified through an electronic gear as the ideal pulse rate of the driver is 500kpps.Will there be plan to increase the pulse rate of the PLC from the current 20kpps one channel?
Another question is how can i write data to a new line in the same text file when writing to a file. Any suggestions?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Stepper pulse and EOL
« Reply #3 on: April 21, 2005, 07:34:58 PM »
If you have a choice of the servo driver, check if you can get one that you can send it the location info via RS232/RS485 port. That will give you very precise movement.  At the moment T100MD+ could not suppt higher than 20KHz pulse rate. Next generation of PLC may be able to support higher rate but at the moment we have no info regarding the maximum pps for future models.

When you use the PRINT command to send string out of the serial port the string is terminated with CR only. To add new line character ie CR+LF you can do the following:

    PRINT #1  A$ + CHR$(13)+CHR$(10);

This will send out A$ with CR+LF and that will become new line in a text file.

Often LF is not required. If you open your text file using Wordpad or MS-Excel it will be able to read the CR and break up the lines.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Ken111

  • Guest
Re:Stepper pulse and EOL
« Reply #4 on: April 26, 2005, 03:24:22 AM »
Thanks for the information regarding the CR. Will try that out. What do you mean by sending the position info through the 232 or 485 port? How do I configure the PLC to do that? Send the pulse through the port? possible to go above 20kbps? sorry i'm a bit lost..


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Stepper pulse and EOL
« Reply #5 on: April 26, 2005, 08:09:03 AM »
Some servo driver accept ASCII commands through its serial port. The main purpose was to allow itself to recceive command from a host computer such as  a PC. But if the servo driver has such an interface then you can use the PLC's PRINT or NETCMD$ command to send ASCII strings to the servo drive to make it move to the desired locations.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS