Hello Guest it is March 28, 2024, 05:49:20 PM

Author Topic: Modbus spindle control questions...  (Read 15621 times)

0 Members and 1 Guest are viewing this topic.

Modbus spindle control questions...
« on: November 05, 2011, 09:42:27 PM »
  Okay guys, after quite some time chasing down some Servo faulting issues I finally decided to swap the computer I used to run my mill. This thankfully fixed the fault issues and as a side effect this new computer seems happy to talk to my Teco Sensorless Vector drive.  SO I decided to try to get this thing configured.

    I  have a fellow over on the zone that has the same setup as I do and he managed to get the modbus spindle control configured and he was kind enough to share his brains he wrote for it. I have loaded them into the machine and now I am trying to get the various settings right to allow this to work.  My teco comes with some software called EV link that allows you to configure the RS232 interface with the drive. I could not get this to work with my old computer but the new one was happy to connect and give me the ability to get the drive setup and I was able to turn it on and off and adjust the speed via a virtual control panel on  the computer. SO I know it works and I have communication with the drive.

   Now for what I do not know. The connection is setup on Com1 with 8 data bits, no parity, and 2 stop bits. I enabled modbus control in mach3 and I turned on the spindle control in mach 3 via enabling the spindle. I read where any port and pin address of 0,0 is assumed to be modbus.  I also attempted to configure the modbus and input the same settings he used on the modbus setup page, IE the port, speed, 8N2, and timeout settings.  I then input the dialogue in the blue blocks that determine the commands he used to control the spindle.  The only thing I changed between mine and his is the port address which was different as well as the baud rate.  When I tried to run the modbus test it will read and gives me a return of 0007.  

    In the spindle setup I selected modbus control and have 64 set and I did not know what to put in the Mach3 Max ADC but I input my max spindle speed of 6550 RPM. I selected to enable spindle relays and have them setup as output 2 and 3 for fwd and rev respectively.   I cannot get the machine to turn on the spindle and I am quite sure I am missing something here. Can anyone help me here?  I would appreciate any information you may be able to add.  This spindle control is something I have missed since I went away from relay control and I am anxious to be able to use my Tormach Tension and Compression tapping head again. Thanks in advance and peace

Pete

Re: Modbus spindle control questions...
« Reply #1 on: November 06, 2011, 04:48:05 PM »
Okay guys,
    Twenty some odd views and NO posts is not very helpful. Anyways, This afternoon Richard was kind enough to call me and go over the modbus setup for the spindle and we were able to get the setup to work and output the frequency. It was setup for him which made my max spindle speed less than what it should be but he was able to show me how to adjust the brains to allow this to be changed.  I had most of the setup right but was not aware of how to properly enable the brans he sent me.  Anyways, Now I can turn on the spindle, adjust the speed(after tweaking some settings) and turn it back off. What I still cannot do and he was unable to show me how is to reverse the spindle.  Right now M3 spins the spindle counter clockwise(wrong I think) and M4 does nothing but stops the spindle.  I would be all set if someone would be kind enough to help me setup my TECO jnev-203-h1 Sensorless vector drive to spin in reverse with the brain controls. I can send the brains I have here if necessary. I would LOVE to be back to tapping with my Tormach Tapping head soon. So any help would be most appreciated. Thanks and peace

Pete

Offline Greolt

*
  •  956 956
    • View Profile
Re: Modbus spindle control questions...
« Reply #2 on: November 06, 2011, 05:34:42 PM »
Okay guys,
    Twenty some odd views and NO posts is not very helpful.

I viewed your post.  For me to reply saying "I know nothing of TECO VFDs" would not aid you much, don't you think?

A lot of very helpful and knowledgeable folks here but sometimes a little patience might be appropriate.   ;)

Greg
Re: Modbus spindle control questions...
« Reply #3 on: November 06, 2011, 05:39:04 PM »
Thanks Greg!.... ;D :D
Re: Modbus spindle control questions...
« Reply #4 on: November 06, 2011, 08:15:08 PM »
The register on the Teco is a standard 16 bit register that has 16 bit flags.  It can only write and read an interger and can not be used as coils.

Bit 0 = 0 Stop 1= Run
Bit 1 = 0 for Forward and 1 = Reverse

Writing an integer would work.

Spindle ON CW  Write a 1
Spinde ON CCW  Write a 3
Spindle OFF Write a Zero

Also, Pete, it would be helpful if you posted the brain here for people to look at.


Anyone know how to do this?

Richard
Re: Modbus spindle control questions...
« Reply #5 on: November 06, 2011, 08:23:55 PM »
Richard,
   Hey man thanks for that. Perhaps that information is clearer to those who understand this stuff. The brains I offered to post but as you said I am not quite sure how to do that...  I can attatch the files I guess but not sure they would be usable here. Anyone have an idea how to do this?  Peace

Pete
Re: Modbus spindle control questions...
« Reply #6 on: November 06, 2011, 09:48:55 PM »
Just attach the VFDRun.BRN
Re: Modbus spindle control questions...
« Reply #7 on: November 07, 2011, 07:12:42 AM »
Hopefully someone can chime in and help with our Brain logic.  

Modbus - I verified with an external program that I can send the following commands and the VFD acts as expected.

Register 40271 = 1  'VFD Runs in Forward
Register 40271 = 3  'VFD Runs in Reverse
Register 40271 = 0  'VFD Stops

In Mach, Modbus Serial Config -> Test the above also works.

I configured the Modbus Serial Plug In properly because in the VB Editor I can do the following and they all work...

SetModOutput (0,1)  'Forward
SetModOutput (0,3)  'Reverse
SetModOutput (0,0)  'Stop

How I'm trying to do the Brain that is eating my lunch is.....

Spindle CW ON   -> Formula (f)Output = 1 -> Modbus/Address 0, Output,Serial Plugin, Cfg 0
Spindle CCW ON -> Formula (f)Output = 3 -> Modbus/Address 0, Output,Serial Plugin, Cfg 0
The above allows the spindle to run in forward.  Reverse does not work, and turning off the spindle does not work.


I also tried writing to an individual bit, but I read that was broken in brains.
Spindle CW ON   -> No Op -> Modbus/Address 0, Output, Bit Only, Bit 0,Serial Plugin, Cfg 0
Spindle CW ON   -> No Op -> Modbus/Address 0, Output, Bit Only, Bit 1,Serial Plugin, Cfg 0
The above allows forward and stop, however Reverse just stops the spindle.
 
So it appears my logic using formulas does not work as I intended.  I know most of the hard stuff is done and I'm just having a hard time figuring out how to write the brain where it behaves properly.

Any help would be so much appreciated.
Richard



Re: Modbus spindle control questions...
« Reply #8 on: November 07, 2011, 06:02:05 PM »
Heck Greg, Pete and I've been stuck on this for months so it's getting frustrating....

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Modbus spindle control questions...
« Reply #9 on: November 07, 2011, 06:22:01 PM »
GUYS VERY VERY VERY few people hav evere fooled with a Modbus VFD so there is going to be very little experience on the matter to be shared.

IF you need help with modbus I would contact either Peter Homman(Modio) or Scott Shaffer. They "MAY" be able to help you unwind your mystery

Just a thought(;-) TP