Recent Posts

Pages: [1] 2 3 ... 10
Technical support / Re: Programming to PLC
« Last post by plcdroid on October 16, 2019, 05:57:47 AM »
I also just learned about PLC.

But I have a reference to learn PLC easily
Technical support / Re: Changing STEPSPEED
« Last post by garysdickinson on October 14, 2019, 07:45:10 PM »
Hello Thierry,

In regards to issuing a StepSpeed command during an active step move command, what I have observed is:
  • The step rate jumps to the PPS specified by the new StepSpeed command
  • The "acc" argument is ignored. There is no ramp. The step output jumps to the PPS value in the new StepSpeed command.

My testing of the StepMove statement is that it is ignored while the stepper is executing a StepMove command.  This approach will not get the behavior that you want.

The PLC stepper motor control hardware/firmware is very simplistic.  It assumes that you just need to move a stepper from one position to another.  The acceleration/de-acceleration and maximum step rate is specified before the StepMove statement executes.

The only thing that you can do while a StepMove is executing is to abort it with a StepStop statement.  This command just shuts down the stepper control system and the steps are abruptly stopped.

I do use the StepStop statement in production PLC code. I use this to stop the stepper system when a switch is closed indicating that the system is in the "home" position. However, the move statement that I use to find the "home" position has the PPS set to a very low rate and no acceleration/de-acceleration is used.

If you are really in need of a variable speed stepper based system you have only a few choices:
  • Stick with the PLC. If you speed changes are great enough for your system to lose steps then you will need to issue several intermediate StepSpeed statements before you get to your next target speed.
  • Look into some sort of motion control system that is external to the PLC. For some motor control needs I use 3 phase motors and VFDs.  The PLC communicates to the VFD via RS-485 (Modbus RTU).  VFDs manage the acceleration profiles to smooth out abrupt speed change requests that the PLC may make.

Best regards,

Gary Dickinson
Technical support / Re: Changing STEPSPEED
« Last post by acxysty on October 14, 2019, 10:19:40 AM »
Hello Gary

Thank you for your answer.

I will think over you suggestion and make measurments.
I would have thought that setting a pwm to a new value would have produced a brutal change in frequency like it is the case on micro-controller.

That raises another question related to my first post : What happen when you apply a STEPSPEED command immediately followed by a STEPMOVE command while still in the middle of the previous STEPMOVE command ? According to some older posts the built-in stepper motor pulse generator will modify its parameters (frequency and number of pulse). How the frequency transition will occur ? Brutal or according to the acceleration law define by STEPSPEED ?

In advance thank you for your replies and you help !



Technical support / Re: Changing STEPSPEED
« Last post by garysdickinson on October 13, 2019, 11:23:30 PM »

You will have to test this.  I have tested most of the stepper motor hardware and firmware, but have not attempted to change the PPS (step rate) of a running stepper. 

I do use the PWM outputs to generate variable frequency pulses.  The PWM outputs will change frequency while running. I have verified this with a digital oscilloscope and see that the output goes to the new frequency very "cleanly".  You could use a PWM OUPTUT to control a stepper motor and change the frequency, periodically.

The following code has been extracted from one of my products that is in production.  The code is called every 0.1 second (10 Hz rate) and changes the PWM frequency.  The code is used to simulate the output of a flow meter. The physical flow meter outputs a variable frequency signal that is proportional to the flow of fluid through the flow meter.

if (VFDCurrentHz < 5.00)
   ' Main Pump speed is too low to generate meaningful flow values
   SimProductGPM = 0.0
   SetPWM 1, 0, 1         ' 0% duty cycle so output is "OFF"
   ' The main pump is running so we will calculate flows based on VFD frequency
   SimProductGPM    = 0.0007 * VFDCurrentHz * VFDCurrentHz + 0.0194 * VFDCurrentHz + 0.7229

   ' Generate pulse output for flow.
   SetPWM 1, 5000, SimProductGPM / 60.0 * ProductPPG

Best regards,

Gary Dickinson
Technical support / Changing STEPSPEED
« Last post by acxysty on October 13, 2019, 08:36:30 AM »
I want to increase/decrease slowly the PPS of a stepper motor without going through acceleration/decceleration phases from/to 0. Is that possible using the STEPSPEED command ?

In different topics it is said that it is possible to modify the PPS of a stepper motor using the STEPSPEED command providing this is not done during the acceleration or decelarration phases.

By doing so is the PPS be varied 'level' by level with going down to 0 each time?

Thank you in advance



Technical support / Re: web page 0.htm DM32 value display
« Last post by TriRob84 on October 08, 2019, 08:56:23 AM »
Thanks for directions, I do have script for Integer and float to be displayed on build in htm pages so gonna try workout DM32 to be displayed based on that. Thanks again.
Technical support / Re: web page 0.htm DM32 value display
« Last post by support on October 08, 2019, 06:34:21 AM »
If you have two 16-bit value, say lower 16-bit in DM[1] and upper 16-bit in DM[2], then you can form a 32-bit number by defining a variable in Javascript such that:

var data32 = DM[2]<<16 + DM[1]

You will need to know some javascript and jquery so that you can insert the value of the variable "data32" into the 0.htm page from the javascript file M.JS (in particular the refreshScreen() function) so that it will display on the 0.htm page.
Technical support / web page 0.htm DM32 value display
« Last post by TriRob84 on October 07, 2019, 09:14:33 AM »
Hi, on base 0.htm page there are DM1 to DM4 values displayed, what directions should I take if I want to display a value from DM32 double register  in one of display fields. My Nano-10 is collecting data from external Energy meter via Modbus where used energy counter is above 65565 so it clocked up next register by one. Im seeing 13885 and 1 in two registers, I also can see correct DM32 value in Nano just don't know how to change what type of register is displayed on HMI display (double instead of integer) and/or how to read DM32 in N.js file.Regards. 
Technical support / Re: Programming to PLC
« Last post by support on September 30, 2019, 03:21:01 AM »
You mentioned in one of your emails that you have T100MD+ PLC which is EOL 8 years ago.

Anyway, it sounds like either someone has put a password in the PLC or the EEPROM is corrupted or damaged. You can try to use TRiLOGI software to transfer a program into the PLC and it will ask you if you want to delete the password and select yet. After you have transferred the program you can turn power off to ON again and see if the new program works. If the new program is not retained then the EEPROM is damaged and you may need to purchase a replacement.
Technical support / Programming to PLC
« Last post by shahid on September 29, 2019, 03:26:06 PM »
I am new to PLC programming. I had some old PLCs lying around in our lab and i wanted to learn to program using these PLCs. Now the problem i am facing is in loading program or trying to connect to PLC. Whenever i try to connect to PLC it asks for a password which no one here knows as these have not been used for some time now. I went through some old threads relating this problem. And i tried sending command IR* but it replies with PWER* instead of IR01* or something like that. Can you tell me the problem or what can i do to solve this issue?
Pages: [1] 2 3 ... 10