Hello Guest it is March 28, 2024, 06:34:49 AM

Author Topic: Problems with Modbus TCP  (Read 21044 times)

0 Members and 1 Guest are viewing this topic.

Re: Problems with Modbus TCP
« Reply #20 on: May 02, 2014, 12:48:15 PM »
Take a look at the Brain I posted.  I am starting and stopping the spindle and changing directions.  I do however have to stop the spindle between CW and CCW commands, but thats OK for now.  I also have to send one command to stop the drive and another to reset it so I can start it again, it puts it into ready state.

My brain essentially does three things.  It starts and stops in either CCW or CW directions.  It resets the drive to Ready and it sends the commanded speed to the drive.  It should almost work as is for you by entering the codes into the formulas in the brain to send the proper codes to your drive.

TeaMan.
Re: Problems with Modbus TCP
« Reply #21 on: May 02, 2014, 02:16:29 PM »
When I get home I will try entering my control words into your full brain.  .  The CMD Spindle RPM is getting a pass signal... Is this getting its input from Spindle setup in settings of Mach3?  I will let you what I come up with.  Thank you for all the help.

Brooks
Re: Problems with Modbus TCP
« Reply #22 on: May 02, 2014, 03:05:32 PM »
you will probably have to do some diting, but you will have a place to start.  The speed uses the G code, S command word.  Example is S800 M3, Which sets the speed to 800 rpm and starts the spindle clockwise.  My drive had two siputs for speed per se.  The one I used was for RPM, the other is for frequency.  Hope this helps.
Re: Problems with Modbus TCP
« Reply #23 on: May 05, 2014, 08:30:12 AM »
I wanted to update everyone and say thanks for all that have helped.  I have successfully gotten my Emerson Sk Drive to communicate and run with Mach3.  Little confusing but start, stop, and input speed work.  Yaay!  Still need to tweak some stuff but, getting closer.  Next I have to figure out how to pull actual speed off drive to mach3 screen so it know how fast its going.  I was looking around the general setup screen in Mach3 but could not find delay g-code till Spindle reached speed.  Am I looking in the right place?

On another note I installed my new NPN Proximity switches on the X and Z axis that replaced my mechanical limit switchs.  One more axis to do and maybe my intermittent limit trigger will finally be fixed.

Again thanks for all the help everyone.

Brooks
Re: Problems with Modbus TCP
« Reply #24 on: May 05, 2014, 10:26:21 AM »
Brooks, Id be interested in the make and model of your prox switches if you dont mind.
Re: Problems with Modbus TCP
« Reply #25 on: May 05, 2014, 05:33:50 PM »
I am using2 different types of Prox..  They are made by Omron.

Z-axis using (TL-W3MC1) NO NPN  10 to 30VDC.  These are small and flat.  Approximately a 3 to 4 mm sensing distance.

X-axis using (E2B-M12KN04-WP-C1 2M) Short body, 12mm housing, unshielded, sensing distance 4mm, Pre-wired end, NPN, NO, 2M cable length, 10 to 30VDC

I will be getting another set of the E2B shortly for Y-axis.

Note: When installing I hooked a set of two together per axis for only one input.  Also in your setting you will have click active low for each one.  Other than that all is well.
Hope this helps.

Brooks
Re: Problems with Modbus TCP
« Reply #26 on: May 05, 2014, 09:58:12 PM »
Neat little devices.  Do you find them accurate enough to use for home switches?  How repeatable do you find them to be?

Ed
Re: Problems with Modbus TCP
« Reply #27 on: May 05, 2014, 10:06:14 PM »
Very repeatable. I am using them as limits and homing. My company uses them on our machines for positioning. We use a range of these devices. I recommend them. 3 wire setup and very easy to hook up. 

Brooks

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Problems with Modbus TCP
« Reply #28 on: May 06, 2014, 07:46:59 AM »
Quote
Next I have to figure out how to pull actual speed off drive to mach3 screen so it know how fast its going.  I was looking around the general setup screen in Mach3 but could not find delay g-code till Spindle reached speed.  Am I looking in the right place?

Under Ports and Pins > goto the Spindle tab >  look at "General Config" middle column that is spindle spin up and spin down delays in seconds that will not let your G code run until that time period is done.

For the speed coming IN from your VFD, you need to ADD the "True Spindle Speed" DRO on to your screen set, (or a user dro), then put that DRO on your screen set.

Further, you will need to put this into a Macro, and then put that Macros number in the General setup page, under "Init" macros.

SetParam( "RPMOverRide" , 1 ) 'allows external override of dro 39 Then you can use a brain to terminate to DRO #39..

Last thing is, unless your spindle motor is direct drive, you will need to put the pulley ratio under "Pulley Ratio(s)" one ratio for each head gear you have.

Scott



fun times
Re: Problems with Modbus TCP
« Reply #29 on: May 09, 2014, 01:51:06 PM »
Thanks for the instructions Poppabear.  I'll give that a try too.

Brooks, where did you get your prox sensors?  I only could find one of them in the online electronic houses.

Thanks
Ed