Hello Guest it is April 19, 2024, 06:54:04 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TeaMan

Pages: « 1 2 3 4
31
Brains Development / Example Brain or Macro pump to run a spindle
« on: February 17, 2014, 10:52:15 AM »
Good morning, I have two VFD's on a 3 in 1 machine, one for mill and one for lathe.  I want to control the spindles for both of these with Mach3.  I am new to Mach3, new to Brains, new to macro pumps, new to DRO's.  I'm looking for an example of either a brain or macro pump or both that can do spindle control from Mach3.  I want to start, stop, change directions and change speed.  I know all of the addresses in the VFD's to start, stop, change speeds and change direction and have tested it all using the Serial Modbus test screen in Mach3.

What I have are two Altivar 12 VFD's hooked to two 3HP motors running 3 phase 240Vac.
So far my communication path is Serial 232 to Serial 485 through a 232 to 485 converter.  The drives are modbus 485 and I also have a Magelis terminal attached that is Modbus 485 or Modbus TCP, but since the drives are Modbus 485, it's connected that way for now.  I'm considering trying Modbus TCP and using a Modbus TCP to Modbus 485 converter, but would like to prove concept with what I have now before I invest anymore.

I'm guessing there is something already here that can do this, but I haven't run across it yet.

If there are tutorials I can use, other than the ones on the Mach3 site, I will dig into them also if you point them out.  I have gone through the ones on Modbus on the Mach3 site.

What I'm needing help with is understanding what DRO's go to what Mach3 screen buttons or actions.
How to set the Modbus plugins up to talk to the drive.  I saw a tutorial from PappaBear that helps, but my addresses are all over the place in the drive, especially if I read things back like RPM.  I was wondering if I should create a line in the plugin for each address.  Everything to these drives is 16 bit words, both digital and analog.  For instance to start the drive in forward, I need to write 15 decimal to memory word 8601, and to run in reverse I write something like 242 to memory word 8601.  To change speed, I write the speed such as 3000 decimal for 3000 RPM to memory word 8602.  I would need less than 10 addresses for each drive, and each drive would be in a separate Mach3 setup.  One Mill, the other Lathe.  Last, I'm not sure how to relate the plugin setup to the Pins setup in Mach3.

Is there anything out there that can help me get started quickly?  I'm not sure if a macro pump may be a better choice or if it should be a brain, or even a combination.

Thanks in advance.
TeaMan

32
Modbus / Re: Problems with Modbus TCP
« on: February 05, 2014, 08:24:36 PM »
Thanks again Scott.  I learned a couple things tonight messing with my drives. I was able to set some parameters to force a manual mode using a switch.  I then noticed a slider on the Modbus test screen in Mach 3.  I slid it to the right to see what it does, and noticed that I couldn't enter a number to write to the drive anymore, and assumed it was persistently reading from the drive.  I could slide it to the left and put a number in to write, click write and slide it right.  The number I wrote, then remained.  I put the drive in manual, started it forward, and when I pressed stop, the number in Mach 3 changed to 260, I pressed reverse, then stop and it changed to 2308, forward then stop repeated the same number as did reverse.  Made me think those were the codes it needed.  I then shut my switch off and returned to Auto or Modbus and it reported 2311.  I converted all three to binary, but haven't compared them to the bits in the control word to see what bits they turned on, but when I tried to write them to the drive in auto, I didn't get any response from the drive.

I also noticed that after I write a value of any kind to the drive, I get a Modbus communications fault after about 10 seconds which is what the Modbus timeout is set for.  I can't figure out why I'm getting this fault.  When in fault, I can not go to manual and manually start the drive in forward or reverse, but can write a value to the address for the control word and read that value back out.  When I slid the slider to the right, it seemed it didn't fault as fast, but eventually does even then.  It seems for some reason the drive is expecting traffic on the Modbus link, or it faults, which again doesn't make sense to me.

As for the address for the control word, I typed 12701 into the Modbus test screen and read from the address, the number it reported was the other address or "3201".  It appears that address 12701 is some kind of pointer to 3201.  I don't have my head wrapped around that yet either.  I need to get that answered from the drives distributer also.

I have read through the documentation on Brains, as well as the Modbus and advanced Modbus videos that talk about brains and macro's, but wanted to prove I could make the drive operate using the Modbus test screen before I got into working with brains or macros.  It seemed like less to go wrong, and fewer variables to worry about.  I'm either writing to the wrong words, or writing the wrong data to them, or worse, there is something wrong in the drives configuration, not letting the drive take Modbus commands from the computer.

A programming manual is a good idea.  I have not run across one, but it's something to ask the distributer.  I do have a user manual and a Modbus Communications manual.  Neither have been helpful.

Thanks again.
TeaMan

33
Modbus / Re: Problems with Modbus TCP
« on: February 05, 2014, 02:09:43 PM »
Thanks Scott.  I hope I'm not hijacking this thread, but hope your answer may help us both.

I'm trying to write to the control word of the drive, it actually has two addresses, and I'm working with the distributor to understand which to use. It has a line such as this in the manual.

Submenu   On the local HMI, it is parameter Description                          Factory setting parameter                Modbus Address
ICS-           NMA1(nNA1) Source drive address of the 1st input word       Address of ETA=3201 16#OC81     NMA1 address 16#319D = 12701

Which Address would we use, the factory setting parameter address or modbus address?

Also in the manual it shows an example value to do certain functions.  One is for Enable Operation and the example is 16#000F which is obviously hex.  From your previous answer, you mentioned converting to decimal.  I was using the modbus test screen in Mach 3 to send a test message to the drive.  I had chosen hex and put this number in as hex.  Are you saying I should change that number to decimal and send it out to the drive in decimal instead?

Thanks
TeaMan

34
Modbus / Re: Problems with Modbus TCP
« on: February 03, 2014, 01:34:22 PM »
I just happened across this post, and am doing almost the exact thing with a Schneider Electric Altivar 12 drive.  I'm doing mine modbus serial right now, but if anyone has insight as to how to write to the control word to start/stop the drive or the speed output, it would help me dramatically.  I have some things to try tonight, and will see if it's successful.  I'll post back if it is.  Any insight to this one would be helpful and appreciated.

I'm trying to do the inital writes via the modbus test screen.  Maybe that is the problem, but seemed to me like the place to prove concept before I wrote a brain.

TeaMan

35
Modbus / Need help with a connection to an Altivar 12 VFD
« on: February 02, 2014, 06:50:05 PM »
Good afternoon everyone.  I have two Altivar 12 Variable Frequency Drives.  I am trying to communicate to one of the drives via Mach 3.

I connected to my drive using the serial communication.  The drive is Modbus 485 Serial, and I'm using a RS232 to RS485 converter.

I was able to connect to the drive using both the SoMove software to program the drives, and was able to both read and write to and from the drive using Mach 3 and the test Modbus screen.  I set it up to start with using the serial configuration and not using plugins.  I wanted to try the simplest configuration possible.

I'm wondering if anyone has had any luck to write any commands to the drive.  I was not able to send any commands or any speed settings.

The drive has communication words, NC1 - NC4 and NM1 - NM4, addresses 12761 - 12764 and 12741 - 12744 respectively.  I can read and write to all the NC1 - NC4 words, and read from all the NM1 - NM4 words.  Nothing happens when I write to the NC1 - NC4 words.

Looking at the configuration of the drive, setting parameter Fr1 to ndb should set it to Modbus.  Doing this disabled my terminal strip and wouldn't allow me to start the drive with my pushbuttons.  I then set CHCF to SEP which should allow separate reference and command, which should have allowed the drive to be started from the pushbuttons.  It didn't work.

Parameter Cd1 was set to tEr which is terminal and should allow the drive to start from the push buttons, but it didn't work.  I reset Fr1 back to All which should have put reference back to analog input 1, and I could now start the drive from the push buttons.

I'm going to do some more studying.  I was hoping someone may have figured this out and could help me understand what I'm missing.

My goal is to first be able to start the drive from the pushbuttons and let Mach 3 control the speed.  If this works, I will try to start, stop and reverse the drive as well as set the spindle speed from Mach 3 via Modbus.

Thanks
TeaMan

Pages: « 1 2 3 4