Welcome, Guest. Please login or register.
Did you miss your activation email?
February 08, 2012, 11:39:35 AM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  KUKA Robot Forum (Moderators: Werner Hampel, Martin H, SkyeFire)
| | |-+  stepper control from KRC2
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Print
Author Topic: stepper control from KRC2  (Read 1982 times)
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1625


« Reply #15 on: March 15, 2010, 08:06:38 PM »

Okay, this is where it can get weird.  Some device brands will, if you mix digital and analog "slices" on a single bus coupler (Wago and Beckhoff are two examples), they will insist on mapping the analogs and the digitals in ways that don't match the physical order of devices.  Generally they'll shift all the analogs to one end, and the digitals to the other.  But that should only happen within a single MAC-ID.  There won't be any cross-talk between slave devices on separate MAC-IDs.

The x multipliers in IOSYS have no numerical limit that I am aware of.  I've gone as high 30+.

Any Wago slice should be compatible with any other Wago slice, but there are some weird requirements.  As you've found, the analogs have to physically go to one end, and they may need their own separate power wiring as well.  I can't swear to Wago, but I do recall finding out the hard way that on Beckhoff units, even though you had to physically place all the analog slices all at one end of the cluster, in the I/O setup, it turned out that the bus coupler re-mapped their I/O to the opposite end of the cluster. 

So, my best guess is that, in their infinite wisdom, Wago decided that when you add your new slices, it rearranges your entire I/O table on that MAC-ID.  At this point, your options are probably either:
A:  work out how the bytes have been rearranged and edit your IOSYS accordingly
B:  Buy another bus coupler (or two) and add the analogs and the Stepper unit as separate MAC-IDs, which should eliminate the problem entirely but will cost more money.
Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #16 on: March 15, 2010, 09:39:52 PM »

Thanks for the reply....


I talked to WAGO, they seems to think things should work...but they dropped a critically overlooked bit of info, which was the 750-670 bytes are ANALOGUE.....well that makes a big difference! So I am working the settings out now. Will report back if it works. With analogue byte assignments, it appears I need to assign each byte as an individual analog out, 8bit wide, ie.

ANOUT1=1,0,8,2
ANOUT2=1,1,8,2
....
ANOUT12=1,11,8,2

OUTB0=1,12,x3

etc.
Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #17 on: March 15, 2010, 10:18:08 PM »

Well,
   It seems to have worked, maybe. I have all of the modules on the bus, no errors, and I can properly actuate my Digital ouptuts, which is my test to see if that part works. I defined the process image of the stepper control as 12 ANIN's and 12 ANOUT's.

Here is where it gets confusing. Things were starting to make sense when I could group OUT's as signals, and write hex data to those signals, but apparently the wago is analogue(I am really having a hard time believing that, but it did work...)

Can I group ANOUTs as a signal? And the KRL manual says ANOUT can have a range of -1 to 1(scaled to 10V). How is that supposed to make sense with bitwise data?
Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #18 on: March 16, 2010, 01:35:35 AM »

OK, I think I fixed it. Scratch all that analog stuff, the wago guy must be crazy. I think I may have missed something earlier, or the order of modules may indeed be flipped. Either way it seems to be working. I will post my IOSYS later, once I am sure. It seems that the coupler may read the 670 first, because my normal outputs all shifted up by 96. We will see.
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1625


« Reply #19 on: March 16, 2010, 03:09:56 PM »

Sounds like you've got it.  My guess is that Wago treats a "special" slice like the stepper controller the same way they do analog slices, and shifts it towards the "front" of the bit map. 

Yeah, analog for a stepper controller doesn't make much sense.  Although, one of the interesting things about a KUKA I/O setup is that the system doesn't completely differentiate between Analog and Digital signals.  That is, an ANOUT/ANIN channel is just a group of $INs/$OUTs, and the analog voltage you want is simply converted into a binary value and put onto that group of $INs/$OUTs.  One of the interesting things about this is that you can map those bits as both Analog and digital, and use them either way (except for when the "live" speed-based analog output is active).  There are some interesting games you can play with this. 
Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #20 on: March 16, 2010, 06:43:25 PM »

Yeah thats sounds interesting. Just in case this doesn't work, how would one figure out the group of $OUT's that an analogue channel represents, with the goal being to group those outs as a signal? Do you have to use io linking? Currently I am still figuring out how to send the right "commands" to the stepper drive, so I still don't know if anything is coming "out" of the stepper controller. I am just hoping the motor will turn!
Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #21 on: March 17, 2010, 03:24:45 PM »

So still no luck here. In the short term I am just pulsing an output into the clock of the stepper drive, but the pulse rate is pretty limiting, ie the 12 ms interp cycle. Any body have any other ideas for an easy way to get a clock signal out of my fieldbus or KRC? I am about ready to give up on this stepper control, after talking to WAGO no one can explain why it doesn't work. It seems to be active as it has a green light, but it doesn't respond "ready" after it is enabled.
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1625


« Reply #22 on: March 17, 2010, 10:18:28 PM »

Double-mapping the I/O is easy in IOSYS -- the system doesn't look for conflicts or overlaps, so you can do almost whatever you like.  So:
Code:
ANOUT1 = 5,1, <16-bit setup here>
OUTB1 = 5,1,x16
It's that simple.  Then just declare
Code:
SIGNAL BlahBlah = $OUT[1] TO $OUT[16]
and you're done.  Just don't turn on the consant-output analog channel, that converts the robot's motion velocity into a constantly-updated analog ouput -- it won't hurt anything, but any change you make to BlahBlah will get overwritten within one interpolation cycle or less.

A pulse faster than 12ms?  Hm, not easy.  IOLINKING might do it, if you can link a signal to itself, something like $OUTx = NOT($OUTx).  But I don't recall offhand if you can add Boolean logic to IOLINKING.  If it works, though, you might get down as low as... 4ms?  I can't recall the details of how fast the I/O update cycle runs.

Just what exactly do you have to send to this stepper controller to make the motor turn?  I mean, a stepper controller ought to be able to run on just a Forward bit, a Backwards bit, and a Clock bit.  Is this thing really demanding 12 whole bytes?  Yow.

As for how ANINs and ANOUTs map to the digital I/O... all you're sending/receiving across the DevNet bus is bits.  Those bits can be grouped into bytes or words at either end.  Getting analog values across the bus is a matter of converting them to a binary value and sending.
The trick is scaling.  Let's say you have an 8bit, +/-5V analog output card.  That means that the actual output will scale from 0V to +5V as the binary patter ranges from b00000000 to b01111111.  The voltage will range from 0V down to -5V as the binary pattern ranges from b10000000 to b11111111.  If you don't add a scaling factor to the IOSYS definition, the robot will send b01111111 when you order it to send +1 (10V), and 11111111 when you order -1 (-10V).  How you really want to look at it is as if the -1.0 to +1.0 in KRL is a multiplier, with the +/-1.0 being "full scale" of whatever the input or output device is, and (for example) 0.5 being 50%.

Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #23 on: March 17, 2010, 11:30:28 PM »

Yeah that doesn't seem like I want to do that. The 12 byte question is a good one, and I think it just dawned on me. The stepper controller has tons of functions I don't need, hence the 12 bytes. I think what I should have gotten is the WAGO PWM module. It just outputs a clock and direction, no mailboxes and programs etc.

I am going to order one of those tomorrow. The manual is only a few pages so the mapping should be much easier. I still can't help but think I may not have the mapping right though, because this module should have worked, but didn't. I have no errors on the bus, and I can see its inputs recognizing external intput(When I run a 24V in to its DI 1, I see this show up in the proper input register based on my mapping.) All I can assume is there is too much complexity in writing a program for it.

With the PWM module, I should be able to set up a 16 bit signal for the pulse rate, and then read back in the pulse count. I will then run a for loop and wait for the pulse count to hit my calculated position, and then exit. I am sure it won't be perfect, but we will see.

Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1625


« Reply #24 on: March 19, 2010, 08:58:06 PM »

Will a PWM do the job?  I don't know what kind of wiring you have between this module and the stepper motor.  I was thinking you needed to wire straight from the DevNet slave to the motor, which would require a separate wired connection for each stepper coil, however many your motor has.  My earlier thought was that the Wago stepper controller would have been a "smart" device that would take just a couple bits from you and take care of handling the low-level coil energizing in correct sequence. 
Logged
wes_mcgee
Jr. Member
**
Offline Offline

Posts: 81


« Reply #25 on: March 20, 2010, 09:45:14 PM »

I have a stepper drive....

BUT, great news! I got the WAGO 670 working. I am still not sure exactly what fixed it. I know it is one of two things...


I changed all the OUTB0=1,0,x1 to

OUTB0=1,0

I don't know if that was it, because I also put the -670 unit right next to the coupler. APPARENTLY the coupler assigns the "register" type input/outputs before the digital AND before the analog. Can you believe that! Would be nice to have that in a manual somewhere. Most people always say the analog will be assigned first, but not here at least.

So it is working great now. Now I just need to figure out how to wire up some limits as "reference" switches.

Thanks for all the help on this, I can't believe it took this long; I was ready to throw the thing through the window...
Logged
SkyeFire
Global Moderator
*****
Offline Offline

Posts: 1625


« Reply #26 on: March 22, 2010, 01:57:52 AM »

Well, one way to be sure would be to try setting the OUTB value back to x1 and seeing what happens.  But I've got a hunch that the Wago placement was the culprit.  I don't know all the Wago rules for slice placement, but I know I've tripped over them far too many times for my comfort.  Which is sad, b/c aside from that I rather like their system -- you can customize a lot of I/O onto a single bus coupler, and they're pretty easy to use, otherwise.  And the DIN-rail mounting is a plus.

Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!