Getting started

Post Reply
pSimon
Posts: 13
Joined: Fri May 11, 2018 7:51 am

Getting started

Post by pSimon » Sat Jul 07, 2018 12:03 pm

Hi,

I've finally got some power on my ET6 board, and I have communications.

So far so good.

I could do with some pointers on how to configure the board properly; at present, it just seems to be driving its Outputs in some sort of "test pattern". Any changes I've made to the profile don't seem to alter this, so there's obviously some element I'm missing.

Machine Outline
---------------

3-axis (later 4 or 5 axis) mill, stepper drive.

The Spindle needs Run signal an output [OUT2], and a PWM drive on [PWM1]

Inputs for Emergency stop [IN0], X/Y/Z zero limits [IN2-4] and Z probe [IN1] (not all will be populated initially)

Flood Relay on [OUT0]

(I don't need to know how to connect I/O, just how to configure the board/software.)


Profiles
---------
I presume I need to create my own profile - which would be the best starting point?

mycnc
Posts: 160
Joined: Thu May 10, 2018 2:42 pm

Re: Getting started

Post by mycnc » Wed Jul 18, 2018 3:16 pm

Hi,

1) What profile name you are playing with?
I'd recommend using some starting with "1280M..." (1280 means base screen resolution, "M" - is for the mill)
If you plan to use 5 axes then "1280M5" profile should be good.

2) Spindle speed is handled in PLC procedures -
M03 - start spindle CW
M04 - start spindle CCW
M05 - stop spindle
SPN - change spindle speed (usually it running when you press on-screen buttons to change spindle speed)

example of standard "SPN" procedure to control spindle speed over DAC channel is

Code: Select all

//set Spindle speed control via DAC
main()
{
  val=eparam;
	//check the value is in 12bits range and fix if needed
  if (val>0xFFF) {val=0xFFF;};
  if (val<0) {val=0;};

  dac01=val;	//send the value to the DAC register

  gvarset(7370,1);//Change the Spindle State

	//update new Speed information in the Control Softwrae
  command=PLC_MESSAGE_SPINDLE_SPEED_CHANGED;
  parameter=eparam;
  message=PLCCMD_REPLY_TO_MYCNC;
  timer=10;do{timer--;}while (timer>0);  //pause to push the message

  exit(99);//normal exit 
};
Line

Code: Select all

  dac01=val;	//send the value to the DAC register
is to send the spindle speed value to DAC register.
You need to fix the line (or add a new line below) If you need to control spindle speed over PWM

Line

Code: Select all

  dac01=val;	//send the value to the DAC register
  pwm01=val;	//send the value to the PWM register
You might need an inverted value on PWM. In this case, the line would be

Code: Select all

  pwm01=0xfff-val;	//send the value to the PWM register

mycnc
Posts: 160
Joined: Thu May 10, 2018 2:42 pm

Re: Getting started

Post by mycnc » Wed Jul 18, 2018 8:47 pm

Here is a simple example of M03 PLC procedure.
http://docs.pv-automation.com/plc/m03_s ... _procedure

If you need to change output pin number for turn On Spindle, the easiest way to edit "pins.h" file and fix OUTPUT_SPINDLE line

Code: Select all

#define OUTPUT_SPINDLE		2
The same about FLOOD relay.

Code: Select all

#define OUTPUT_FLOOD		0
Then rebuild all PLC sources - press 3 buttons of the right of "PLC Builder" screen -
  • Build All
  • Save All
  • Send to the controller

mycnc
Posts: 160
Joined: Thu May 10, 2018 2:42 pm

Re: Getting started

Post by mycnc » Wed Jul 18, 2018 11:50 pm

Example of Emergency Stop setup
mycnc-profiles--30.png
mycnc-profiles--30.png (159.12 KiB) Viewed 295 times

mycnc
Posts: 160
Joined: Thu May 10, 2018 2:42 pm

Re: Getting started

Post by mycnc » Wed Jul 18, 2018 11:50 pm

Example of Limits XYZ setup
mycnc-profiles--31.png
mycnc-profiles--31.png (131.74 KiB) Viewed 295 times

pSimon
Posts: 13
Joined: Fri May 11, 2018 7:51 am

Re: Getting started

Post by pSimon » Thu Jul 19, 2018 2:30 pm

Thanks - I will hopefully gat a chance to look at this over the next few days.

What causes the "test pattern" behaviour I see? (all the I/O seems to be changing in a repetitave manner).

mycnc
Posts: 160
Joined: Thu May 10, 2018 2:42 pm

Re: Getting started

Post by mycnc » Fri Jul 20, 2018 3:42 pm

pSimon wrote:
Thu Jul 19, 2018 2:30 pm
What causes the "test pattern" behaviour I see? (all the I/O seems to be changing in a repetitave manner).
I suppose it's the test peripherals procedure.
Please check this

pSimon
Posts: 13
Joined: Fri May 11, 2018 7:51 am

Re: Getting started

Post by pSimon » Mon Jul 23, 2018 8:33 am

yes, that's what I was seeing. Thanks!

Post Reply