Hello Guest it is April 24, 2024, 09:39:36 AM

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 - rrc1962

541
General Mach Discussion / Re: Mapping modbus to PLC
« on: December 19, 2010, 11:24:40 PM »
I've pretty much been through all the vids and docs.  I'm real close.  I've got everything working in NP modbus.  I can assign inputs and outputs in ports and pins and everything works.  I can set modbus data in VB, but the only thin I can't get working is brains.  I may be using the wrong address.  I used the same address specified in the modbus setup, which didn't work.  Then I tried the PLC address (1500) and that didn't work.  Seems the one only thing it will accept in a small integer.  It accepts 0 and 1 as address but neither work.  What am I doing wrong?

542
General Mach Discussion / Re: Mapping modbus to PLC
« on: December 19, 2010, 05:35:22 PM »
I'm making headway.  I think I've figured out how to map a specific V memory address to the modbus.  I tested setting bits both ways and it seems to be working.  The question I have now is how to send actual data, like the number 50 and have it formatted in binary in the PLC so the program can use it.   Do you convert the number in VB then send it using SetModOutput()?  I know that's how you set a bit, but will it also work for sending a word?

543
General Mach Discussion / Mapping modbus to PLC
« on: December 19, 2010, 01:09:10 PM »
I'm having a time getting my head wrapped around this.  I'm working with a DL05 and have a program running on the PLC.  It responds as it should to switch X inputs and triggers Y outputs.  Just to get something up and running quickly, to communicate with mach, I energize a Y output which puts 5V on a mach PP pin.  Mach sees this and does it's thing.  The PLC also has 4 analog inputs for doing various things.  One comes from my plasma voltage divider so that one has to be a analog input, but the other three are just for setting parameters.  These parameters could be set on a mach screen and written to the PLC V memory via modbus.  My analog input is binary, so when I write a value (a number between 0 and 50) in needs to be in binary.

I guess my issue is that I'm lost when it comes to modbus addressing.  All I know for sure through trial and error with the modbus monitor is that 1024 - 1028 are my 4 analog inputs.  I can see X inputs at 2048 but only if I select "Discrete Inputs" and specify 8 inputs in the monitor.  I can see all 8 switch no problem.  If I select "Input Registers" I see nothing, just zeros.

What I would like to do is pick a V memory range on the PLC and use that for bit input/output.  For instance, use V2200 for X inputs and V2201 for Y outputs.  X0 = V2200.0, X1 = V2200.1......X7 = V2200.7.  Same thing for V2201.  So my PLC program wanted to notify mach of an event, it, for instance, would set V2201 bit 0.  Mach would then need to see this....and this is where I'm running in circles.

I've gone through the PLC manual but it's pretty vague when it comes to modbus addressing, and the examples they give don't seem to make sense.  Could someone please give me a rundown on how the modbus maps to V memory locations on the PLC?

Thanks

544
General Mach Discussion / Re: Servo Motors 101
« on: December 15, 2010, 08:45:39 AM »
Thanks Hood.  I was looking at servos just for the Nema 23 standard mounting, but you're right, any DC motor would work.

545
General Mach Discussion / Servo Motors 101
« on: December 14, 2010, 09:02:50 PM »
This may be a stupid question, but is a servo motor just a DC motor?  If I take a 60VDC servo motor and apply 60V to the terminals will it spin at it's rated RPM?  If I reverse the terminals, will it reverse direction?  I need a NEMA 23 DC motor.  All I need to do is control on/off and forward/reverse which I can do with DPDT relays.  It would also preferably have a brake, which should be able to be added to the tail shaft of the motor.

Thanks

546
VB and the development of wizards / Using Include Files
« on: December 14, 2010, 08:06:20 PM »
Can you use include files in VB Script?  I have a few functions that need to be attached to more than one button script.  I'm trying to avoid duplicating each function on each button script.  There are parameters that could change in the functions and I'd rather just have to deal with one copy.

Thanks

547
General Mach Discussion / Re: machine running irregular on button script
« on: December 14, 2010, 01:33:21 PM »
I'm thinking the scope of the array will not extend beyond the instance of the script it resides in.  In other words, every time you call M1234, you'll be dealing with a new empty array rather than one array with global scope.  In VB.NET I would just create a global array but I'm not sure if that's possible in VB script.  If, as Graham suggests, you are able to create a global array via a macro, I'd be curious to see how you did it.  Not saying it can't be done, just never tried it and curious if it's possible.

548
General Mach Discussion / Re: machine running irregular on button script
« on: December 13, 2010, 09:31:37 PM »


The real problem is missing the steps...



You may be missing steps because the PC is busy writing to a file after the G4 finishes.  Mach works best when it is the only thing using PC resources.  In other words, the file write may be taking longer than the G4 is allowing.  You could try increasing the G4 dwell, but personally, I wouldn't be trying to write the file on every G31 move.  Store the coordinates in an array, then when the routine finishes, open the file, dump the array to the file and close the file.

549
General Mach Discussion / Keling C35 BOB
« on: December 13, 2010, 07:50:13 PM »
I'm not sure if this is the right place for this question, but has anyone used the Keling C35 BOB with the Gecko G201 or G203 drives?  I see that they bill it as "quick connect" which is only really true is you use their drives.  Does the little RJ45 -> pin-out board they supply match up to the Gecko drives?  If not, I see a couple of options.  (1) Make an RJ45 -> pin-out that does work or (2) Just strip back the drive end of an RJ45 cable.  What have you done and how did it work out?

Any other comments about this BOB...Good or bad?

Thanks

550
General Mach Discussion / Re: machine running irregular on button script
« on: December 13, 2010, 07:09:58 PM »
I would write each coordinate to an array, then when the process finishes, write the array to the file.  Updating an array is much faster than writing to file.  Just write the file once. 

FWIW...I've seen the same issue with G4 pause commands being skipped and it wasn't from a button script.  It is while running a g-code program.  It's usually the first one in the program.  No idea what causes it, but it hasn't been enough of an issue to spend a whole lot of time on.