Hello Guest it is December 06, 2019, 12:20:43 AM

Author Topic: Cubloc, brains and ModIO  (Read 16112 times)

0 Members and 1 Guest are viewing this topic.

Cubloc, brains and ModIO
« on: April 05, 2008, 12:06:25 PM »
I am going to try to use a Cubloc to control the tool turret on a CHNC lathe.  I would like to know how I can sent the tool requested information from Mach to the Cubloc via ModIO.  I guess a brain would work, but how does one get the tool number from mach to modio?

Thanks

Vince

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Cubloc, brains and ModIO
« Reply #1 on: April 07, 2008, 10:38:31 AM »
If you want to send Tool infomation via brains, then one option is to use a "User DRO", put the tool number into the
DRO and drop that number into Cubelogic. Have your ladder or Basic program look at the number and then equate that number to a rotation degree that represents where that tool is in your caracell.

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: Cubloc, brains and ModIO
« Reply #2 on: April 07, 2008, 11:03:37 AM »
OK, the questions should be, how do I get the tool number to a user DRO? and How can I send that to the Cubloc?  I know how to comunicate with the Cubloc through ModIO. 

Vince

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Cubloc, brains and ModIO
« Reply #3 on: April 07, 2008, 12:07:29 PM »
Ok,
   
   I have attached a Brain as an example. What it assumes is your using the Serial Plugin enabled, and using configuration 0 as your output config, and that your passing your tool number through Modbus address 0.

It will need to map Modbus Output 0, through the Serial plugin modbus config to the address you want to drop that DRO's information in your Cublogic.

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: Cubloc, brains and ModIO
« Reply #4 on: April 07, 2008, 03:13:52 PM »
Thanks Scott, I will work on it over the next couple of days.  Your example should be enough for me to modify to fit my application.

Vince
Re: Cubloc, brains and ModIO
« Reply #5 on: April 17, 2008, 10:22:21 PM »
I am just trying to get the brain to talk to my Cubloc.  I can communicate with the cubloc when I am in the Test Modbus screen.  I can turn on and off outputs and read inputs.  Below is my serial modbus set up and the brain file.  When I either click on the coolant button in Mach Lathe or send an M8 code via the MDI screen, I am not getting any output on my address 32 on my Cubloc.   On the cubloc, the address are P1 though P65.

Any suggestion would be helpful.

Vince

Offline poppabear

*
  • *
  •  2,233 2,233
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: Cubloc, brains and ModIO
« Reply #6 on: April 18, 2008, 09:13:48 AM »
Vince,

   I dont use a Cubelogic, BUT, I notice a few things:

1). first the serial protocol in mach is 8-N-2
2). Your Delay time outs are way high, is that due to your serial to USB converter?
3). I noticed you have several config files, is there any way to have sequential Block of input, and Block of output registers in the cubelogic.
4). Change your output type and input type to Input and Output holding repectivley and when that register comes into the cubelogic use Bit of Word or what ever your equivelent is to get the discreate bit. You can pass your holding registers as your control registers in the Cubelogic.
5). Your Modbus Run box is not checked, perhaps you need to, or forgot about it.
6). Make sure your Flood LED actually Turns ON, when you hit the M code.

Scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: Cubloc, brains and ModIO
« Reply #7 on: April 18, 2008, 06:57:50 PM »
Thanks for the help.

"1). first the serial protocol in mach is 8-N-2"

I changed the protocol to 8-N-2, still did not work

"2). Your Delay time outs are way high, is that due to your serial to USB converter?"

No converter, I was just copying someone else’s code.  I set them for 25ms

"3). I noticed you have several config files, is there any way to have sequential Block of input, and Block of output registers in the cubelogic."

Yes, the Cubloc can have sequential block of inputs, but not with the board I am using.

"4). Change your output type and input type to Input and Output holding respectively and when that register comes into the cubelogic use Bit of Word or what ever your equivalent is to get the discrete bit. You can pass your holding registers as your control registers in the Cubelogic."

I don't know how to do that in the Cubloc.  I have sent them an email asking how.

"5). Your Modbus Run box is not checked, perhaps you need to, or forgot about it."

Oops, I forgot that.

"6). Make sure your Flood LED actually Turns ON, when you hit the M code."

Another Oops, they were not enabled.  I changed that and verified that they are working.  In the Cubloc, the IO has to be set up in Basic to allow communications for either Basic programs, or Ladder programs.  I am missing something in the Basic program setup.  Hopefully they will get back to me soon and I can get this running.  Once this simple communication thing is fixed, I think I can get most of what I want to do finished.

Thanks again, I'll post when I get the answers from Cubloc.

Vince
Re: Cubloc, brains and ModIO
« Reply #8 on: April 18, 2008, 07:18:19 PM »
Hi Vince,

everything you have to know you find in CubLoc-Manual.
I'm running 3 of them (CB280) and everything works fine

show me your code and maybe i can help you

Regards Frank
Re: Cubloc, brains and ModIO
« Reply #9 on: April 18, 2008, 07:28:59 PM »
Hi Vince,

everything you have to know you find in CubLoc-Manual.
I'm running 3 of them (CB280) and everything works fine

show me your code and maybe i can help you

Regards Frank

If you mean the cubloctoughmanual.pdf, I have read through that and am completely lost.  What I have been able to do I just cut and pasted from someone else's program.  I don't have much code and that is on my work computer which I will not have access to until Monday.  For now, all I want to do is turn on an output on the Cubloc from a Brain.  The second thing I want to do is pass a tool number from 1 to 8 from Mach to the Cubloc.  I will then have a ladder program get the tool based on that number.  I am using the 405 module.  Is that enough information?

Thanks

Vince