adccommunitymod (AutomationDirect) asked a question.

How to clear STP-DRV-4850 memory in between moves (using P1K PLC)?

Created Date: November 08,2019

Created By: Cliff T.

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I earlier posted about my P1K PLC not talking to the STP-DRV-4850 drive and it turned out I was using the wrong communication cable. I obtained to proper cable and now have created an "FP " move based on a one shot HMI input (start button). My expectation is that once the initial "FP " move is finished I should be able to press the "start " button again and start a new "FP " move but when I push the start button a second time nothing happens. I am not sure if this is because the "FP " is an absolute move and I am trying to move to the same place twice or if the drive still has "leftover " commands from the original "FP " move that need to be cleared out after the first move is made (note: I am trying to use a SP0 command before the FP to set initial position at 0 each time). I have attached screenshots of my logic and if necessary can post the program itself. As always, any input from this awesome community is sincerely appreciated and thank you in advance for your time.


  • adccommunitymod (AutomationDirect)

    Created Date: November 08,2019

    Created by: Cliff T.

    I earlier posted about my P1K PLC not talking to the STP-DRV-4850 drive and it turned out I was using the wrong communication cable. I obtained to proper cable and now have created an "FP " move based on a one shot HMI input (start button). My expectation is that once the initial "FP " move is finished I should be able to press the "start " button again and start a new "FP " move but when I push the start button a second time nothing happens. I am not sure if this is because the "FP " is an absolute move and I am trying to move to the same place twice or if the drive still has "leftover " commands from the original "FP " move that need to be cleared out after the first move is made (note: I am trying to use a SP0 command before the FP to set initial position at 0 each time). I have attached screenshots of my logic and if necessary can post the program itself. As always, any input from this awesome community is sincerely appreciated and thank you in advance for your time.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 08,2019

    Created by: IMNCTRL

    Sounds like you should be using the FL (feed to Length) command which uses a relative move.

  • adccommunitymod (AutomationDirect)

    Created Date: November 08,2019

    Created by: akahammer

    I don't know your PLC, I see the command in your program but, if really a true sp0 command like dl6 plc then sp0 only happens on very first scan after power up or after going to run mode after program not every scan

  • adccommunitymod (AutomationDirect)

    Created Date: November 08,2019

    Created by: Cliff T.

    Thank you for the input! I will try changing my FP command to FL and see what happens (being sure to post results). Being new to SCL I will do some more research to see if the SP0 is a first scan command or not.

  • adccommunitymod (AutomationDirect)

    Created Date: November 08,2019

    Created by: MikeN

    The "SP0 " he is sending is an ascii command, not the same as the typical SP0 in a PLC. Where a PLC that would be first scan, SP is just set position and 0 is 0 counts. It looks the same when talking about it on a web forum, but they are actually different commands and going to different areas.

    Using set position 0 and then feed to position 20,000 should work, but I am wondering if there is just some interaction there that is causing issues. Like maybe you need to send the set position and execute before you send the feed to position and execute. Im not sure if that is the case or not, but Im just thinking that maybe buffering them both for execution in a single command may be causing the issue.

    Either way, using feed to length is probably an easier fix and would do what you want in a single command instead of using two.

    edit:

    another way you could test if your SP+FP command is working or not would be to make a second button that executes a position move with an FP0. Execute the first command to move CW to 20k steps, then hit the second button and see if the stepper moves CCW backwards 20k steps. If it does, the set position is not working properly.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 08,2019

    Created by: Cliff T.

    Thanks MikeN! I will try buffering the SP and FP commands separately as well as the second button idea for more in depth knowledge (although it sounds like I should ultimately go with FL).

  • adccommunitymod (AutomationDirect)

    Created Date: November 12,2019

    Created by: Cliff T.

    I ended up going with the FL function and everything is performing as it should. On a new note if I simply wanted to jog the motor what would be the easiest way to jog CW and CCW?

  • adccommunitymod (AutomationDirect)

    Created Date: November 13,2019

    Created by: Todd Dice

    I don't know your PLC, I see the command in your program but, if really a true sp0 command like dl6 plc then sp0 only happens on very first scan after power up or after going to run mode after program not every scan

    The first scan bit in Productivity is, "First Scan Bit, " as the software is tag based and you program by tag names, not by addresses.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: November 13,2019

    Created by: Cliff T.

    So I am now jogging in one direction (CW) as necessary but do not know how to jog CCW. Is there some sort of "set direction " command that I need to use as well?

  • adccommunitymod (AutomationDirect)

    Created Date: November 13,2019

    Created by: Cliff T.

    DI VS DI-, all is good!

10 of 13