Announcement

Collapse
No announcement yet.

DoMore BRX, serial port, stepper control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • DoMore BRX, serial port, stepper control

    I have a BX-DM1-18ER-D PLC, step drive STP-DRV-4850, using the serial RS232 port to the motor driver.
    In Surestep PRO, I set it to SCL command, (I called tech support they told me to uncheck ack and nack) which I did, and reconfigured the drive.
    I configured the serial port in the PLC settings, but also using the SETUPSER instruction box, device @IntSerial, Baud 9600, data 8, stop 1, parity none.
    I just put in 2 rungs to see if I can get the motor to operate, I just used a normally closed bit to a STRPRINT instruction prints to SS0 set up as "AC25$R" "DE25$R "VE5$R" "FL20000$R" (That is how I typed in the string, but when I close out it changes all the $R to $0D)
    The last rung in an ST1 bit to a STREAMOUT box, device @IntSerial, String Stream SS0, the success bit goes on, but the motor doesn't do anything.

    I did confirm PLC is in run mode when I was trying to operate the motor.

    I can operate the motor in the Surestep Pro software, its just when I get onto DoiMore, so I am thinking have something wrong in my programming, never set up a stepper motor, any help is appreciated.
    Thanks,


  • #2
    Originally posted by jtak101 View Post
    a STRPRINT instruction prints to SS0 set up as "AC25$R" "DE25$R "VE5$R" "FL20000$R" (That is how I typed in the string, but when I close out it changes all the $R to $0D)
    The reason it changes the "$R" to "$0D" is because that is a Control Character shortcut. To get the result you want use "AC25$$R" "DE25$$R" "FL20000$$R". The extra "$" lets the editor know that you do not want a Control Character shortcut, but an actual "$R" instead. Regarding getting this to work otherwise, I'm not the drives expert.

    BTW, if you look at Do-more Designer Help Topic DMD0168 you can see all the Control Character shortcut chart. (Open Help, Search, type in DMD0168 to do the search).
    Greg Kiser
    Hos Engineering, Inc.
    support@hosteng.com
    http://forum.hosteng.com
    This isn't all true.

    Comment



    • #3
      Looking at the STP-DRV SCL manual, it appears that you do need the <CR> character ($0D) (aka ENTER; from the SCL manual: In this example, note that <ENTER> means press the ENTER key on your keyboard, which is the same as terminating the command with a <cr>). So, keep the single $.

      Make sure your STRPRINT does NOT have "Automatically insert a space after each item". Does that make it work?

      There are 10 kinds of people in this world, those who know binary, and those who do not.

      Comment



      • #4
        Originally posted by franji1 View Post
        Looking at the STP-DRV SCL manual, it appears that you do need the <CR> character ($0D) (aka ENTER; from the SCL manual: In this example, note that <ENTER> means press the ENTER key on your keyboard, which is the same as terminating the command with a <cr>). So, keep the single $.

        Make sure your STRPRINT does NOT have "Automatically insert a space after each item". Does that make it work?
        Okay changed it back to ($0D) and it did have "Automatically insert a space..." so I unchecked that still didn't work. I posted below the code I have just to get the motor to run. other than the ST1 bit I copied what was in the automation direct help video, so I am at a loss.
        Attached Files

        Comment



        • #5
          Originally posted by jtak101 View Post
          I posted below the code I have just to get the motor to run. other than the ST1 bit I copied what was in the automation direct help video, so I am at a loss.
          I do not see any code. I would change your STRPRINT/STREAMOUT to using an unused C bit that you can set from a Data View in Designer. I also like making the C-bit auto-resetting by sticking a RST coil below the STREAMOUT instruction.
          There are 10 kinds of people in this world, those who know binary, and those who do not.

          Comment



          • #6
            Originally posted by franji1 View Post

            I do not see any code. I would change your STRPRINT/STREAMOUT to using an unused C bit that you can set from a Data View in Designer. I also like making the C-bit auto-resetting by sticking a RST coil below the STREAMOUT instruction.
            Attached what I believe you are saying, I forced C0 on, motor still didn't turn, The TX and RX lights are not blinking either on the RS232 port on the PLC either. I just hooked the drive back up to SurePro and ran the self test, everything tested ok.

            Thanks,
            Attached Files

            Comment



            • #7
              Here is a small working program block that I was using to control a stepper.

              Just start a brand new project in DMD.
              Copy all the text inside the attached file.
              Right-click in your 'Project Browser'.
              Select 'Paste code-block'.

              You should now have a sample that will hopefully get you started down the right path.
              Attached Files
              Circumstances don't determine who we are, they only reveal it.
              Jason Wolthuis

              Comment



              • #8
                Originally posted by plcnut View Post
                Here is a small working program block that I was using to control a stepper.

                Just start a brand new project in DMD.
                Copy all the text inside the attached file.
                Right-click in your 'Project Browser'.
                Select 'Paste code-block'.

                You should now have a sample that will hopefully get you started down the right path.
                The 'Paste code-block' is greyed out I confirmed I copied, am in edit mode in DMD, started new project.

                Comment



                • #9
                  On a new instance of Designer, do File->Import=>Project and import Jason's file
                  Then right click on the imported code-block in the Project Browser and hit Copy Code-Block
                  Go to your original project and (in Edit mode Ctrl+E), right click in the code-block area of the Project Browser and select Paste Code-Block
                  There are 10 kinds of people in this world, those who know binary, and those who do not.

                  Comment



                  • #10
                    Sorry about my instructions
                    Thanks franji1
                    Circumstances don't determine who we are, they only reveal it.
                    Jason Wolthuis

                    Comment



                    • #11
                      Thanks, was able to get it loaded, (I like the stage programming can see how that can be convenient.) I really looked at the instruction boxes and nothing stood out that was different , I watched the help video on AD website and copied that code for STREAMOUT and STRPRINT, still nothing, is there anyway to test the serial port on the PLC, the TX/RX lights show no signs of life... I confirmed I set up the port to the correct baud rate, the status light on the drive is checking out okay, even when I run the program in run mode the success bits go on.

                      Comment



                      • #12
                        Lights should work even if the port is broke. Something more fundamental going on here. Port is internal or POM?

                        Comment



                        • #13
                          Originally posted by BobO View Post
                          Lights should work even if the port is broke. Something more fundamental going on here. Port is internal or POM?
                          It works! First thank everyone for helping out, its always appreciated... after re-reading the manual for the 3rd time it clicked... I had wired the TX to the TX and RX to RX.... flopped wires ran the test program and motor came on... Thanks again everyone!

                          Comment

                          Working...
                          X