Lathe Spindle Encoder

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

promisemachining
Posts: 79
Joined: Thu Nov 17, 2016 2:59 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0327060180, T39 A90089, M-39s 3535, M-39s 3770, M400ac/inv, M400ac/atc 10388
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe Spindle Encoder

Post by promisemachining »

Sirs,
I have my Lagun 2180 CNC Lathe up and running! I love this CNC12 control!!! I still have a few issues these are the ones I am looking at first.
1.) In our prior discussion about powering the spindle lube pump. You suggested assigning an unused output for this. The Work Light output is not being used. So I thought it would be a good choice for this. Is there a sheet with instructions for this. I have been through the Allin1DC install manual and I am not finding what to do. Maybe I am looking right at it and not understanding.
2.) Way Lube Ok error. Every time I hook the float wire up to #9 in, I get an error message. I have changed the paramiter for #178 from 0 to 1 and back. I have used Alt + I to look at #9. I have a white line above led #9 and can get the white line below the led to come and go with Ctl + Alt + F but the white line remains above the LED. I think I need to get rid of the white line above the LED.
3.) Gear Range Proximity Switch. My electronics guy thinks I can get my proximity switches in the head stock to register if we reduce the voltage that the switch generates. They are GE 2 wire sensors. What voltage siginal is the AllN1Dc looking for to work properly. These are in the headstock and now that I have the machine back up and running and all the sheetmetal siliconed so I does not leak, getting to these to replace them with a 3 wire will be a lot of trouble.
Thank you!
Tim Lovely
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Lathe Spindle Encoder

Post by cncsnw »

The PLC programming manual is here:
https://www.centroidcnc.com/centroid_di ... manual.pdf

If you have the patience and preference for watching videos, see:


Once you know how to save a copy of your PLC program source under a new name; edit it; and compile it, then you may find the following useful:

1) Locate the definition for the work light output, e.g.

Code: Select all

WorkLightOut_O                  IS OUT6  ;SPST Type 
... and replace it with whatever you need, e.g.

Code: Select all

SpindleLube_O                  IS OUT6  ;SPST Type 
2) Locate the code that controls the work light, e.g.

Code: Select all

;--Worklight

IF (Aux7Key_I || SkinAux7_M_SV || KbAux7Key_M) THEN (Aux7PD_PD)
IF (Aux7PD_PD ^ Aux7LED_O) || OnAtPowerUp_M THEN (Aux7LED_O)
IF Aux7LED_O THEN (WorkLightOut_O)       
... and delete it.

3) Somewhere suitable -- maybe near the top of the MainStage section, add new code to run the spindle lube pump whenever the spindle motor is running:

Code: Select all

; Run spindle lube pump whenever spindle motor is running
IF SpindleEnableOut_O THEN (SpindleLube_O)
Save, compile, and cycle the power.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Lathe Spindle Encoder

Post by cncsnw »

Regarding the low-lube signal.

First, highlight INP9 and press Ctrl-Alt-F as many times as needed to make the underscore go away.
Next, press Ctrl-Alt-i as many times as needed to make the overscore go away.
Next, verify that your float switch is wired to INP9 and that there is adequate oil in the tank.
If INP9 is now green, you are done.
If, with the float switch hooked up and adequate oil in the tank, INP9 is red, then highlight INP9 and press Ctrl-Alt-i once to invert it.
promisemachining
Posts: 79
Joined: Thu Nov 17, 2016 2:59 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0327060180, T39 A90089, M-39s 3535, M-39s 3770, M400ac/inv, M400ac/atc 10388
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe Spindle Encoder

Post by promisemachining »

CNCSNW
Thank you for the information. I have the way lube error taken care of. I will watch the PLC video later.
Thank you for your help.
Tim Lovely
promisemachining
Posts: 79
Joined: Thu Nov 17, 2016 2:59 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0327060180, T39 A90089, M-39s 3535, M-39s 3770, M400ac/inv, M400ac/atc 10388
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe Spindle Encoder

Post by promisemachining »

Sirs,
I have downloaded the Notepad ++ 8.3.3. I have followed the directions from TB294 Rev 2 Configuring Notepad ++. At step 10 is where I am hung up.
I get this message, it does not look like what is being shown in the video.
DSCN2708.JPG
I have downloaded and installed the Notepad++ 3 times and set it up each time and I still get this message. What am I doing wrong or what do I need to diffrent?
Thank you,
Tim
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Lathe Spindle Encoder

Post by cncsnw »

I can't help you with the Notepad++ configuration.

If you just want to compile a newly-modified PLC program, you can always do that from a command prompt window.

Suppose that you have edited a PLC program source file, and you have saved the modified file as "MyNewPLC.src", in the c:\cnct directory (because you have a lathe).

Then you could open a command prompt window, by entering "cmd" on the Windows Start menu.
In the command prompt window, it will be convenient to change directories to the c:\cnct directory:

Code: Select all

cd  \cnct
Then you call the compiler, mpucomp; give it the name of your source file; and give it the name of the destination file to put the compiled result in. That must be "mpu.plc" in order for the control to use it:

Code: Select all

mpucomp  MyNewPLC.src  mpu.plc
When you are done with the command prompt window you can close it with the command:

Code: Select all

exit
Amazingly, this magical method of compiling PLC programs works on every Windows-based CNC11 or CNC12 control, regardless of whether Notepad++ is installed or properly configured.
promisemachining
Posts: 79
Joined: Thu Nov 17, 2016 2:59 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0327060180, T39 A90089, M-39s 3535, M-39s 3770, M400ac/inv, M400ac/atc 10388
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe Spindle Encoder

Post by promisemachining »

I am still trying to get the Notepad++ to work. If I can not get the notepad++ to work then I probably should not to mess with the PLC, but I need to get that changed so the spindle lube pump is on when the lathe spindle is running, manually plugging it in only works when you remember to do it..
So... I went back and installed the same version that was used in the youtube video link. I am still getting the same message that I got before. In the video, looking at the adress bar across the top of the video screen, it looks like that the notepad++ software is actually inside of the CNCT software folder. See attached picture. In the video as soon as he gets the notepad++ installed he is getting what looks like Centroid information on his notepad++ screen. I did not see a step that had me install the software inside the CNCT folder.
Attachments
DSCN2711.JPG
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Lathe Spindle Encoder

Post by cncsnw »

In the video, looking at the adress bar across the top of the video screen, it looks like that the notepad++ software is actually inside of the CNCT software folder.
No. The title bar at the top of a text editor window generally shows the full path name (filename and location) of the text file that is being edited. That has nothing to do with where the editor program happens to be installed. When you install Notepad++ on a Windows 7 or 10 system, it generally gets installed into a subdirectory below the "c:\program files" directory.
eng199
Posts: 372
Joined: Fri Jan 10, 2014 11:29 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Howard, PA

Re: Lathe Spindle Encoder

Post by eng199 »

promisemachining wrote: Mon Apr 18, 2022 2:40 am I have downloaded the Notepad ++ 8.3.3. I have followed the directions from TB294 Rev 2 Configuring Notepad ++. At step 10 is where I am hung up.
Did you follow step 6 exactly? You should have created compile.cmd there.
promisemachining
Posts: 79
Joined: Thu Nov 17, 2016 2:59 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0327060180, T39 A90089, M-39s 3535, M-39s 3770, M400ac/inv, M400ac/atc 10388
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: Yes

Re: Lathe Spindle Encoder

Post by promisemachining »

Sir, Step 6 is probably where I am going wrong.

"If you are running Lathe software, rename c:\cnct\compile-lathe.txt to compile.cmd"

Do you just rename the file to compile.cmd and leave it as a .txt file or do you have to change the file extension to .cmd as well?
I right clicked on the file and simply renamed it. I did not change the file extension. There are other .txt files in there that have . something else in their name.
Thank you,
Tim
Post Reply