Re: Jedicut and Arduino over USB

31
Hi,
So, unfortunaly it doesn't works with a mm2001 interface... :(

The motors on/off function works well, the red LED is turned ON if an order motor is sent, but nothing moves : /...

I think my configuration in Jedicut's options is correct :

-USBSerial.dll plug-in of course, with the comport.ini file :
[COMPORT]
PORTNUMBER = 16
(my USB port arduino nano adapter is COM16)

-without external timer
-No heat management
-pins configuration : similar to the parallel port configuration of the mm2001 interface.

Some ideas 8-) 8-) ?

Re: Jedicut and Arduino over USB

33
Hi Vincent,

the configuration may be wrong. If you use the arduino file as it is, then you need to make the wires as I described in my first posting but adapted to your MM2001 board (it is not important if you turn on or off external timer,because the timing is made by the microcontroller):

[pre]
Arduino uno LPT Sub-D connector
12 ? All motors On/Off
8 9 X step
9 2 X direction
10 7 Y step
11 4 Y direction
4 5 Z step (X2)
5 6 Z direction (X2)
6 3 A step (Y2)
7 8 A direction (Y2)
GND 18-25 Ground
[/pre]

but the pin configuration within jedicut must reflect the arduino code :
PortConfig.jpg PortConfig.jpg Vu 5235 fois 54.52 Kio
You may also experiment with "Cut speed" and "Fast Speed" in the CNC Controller settings. I use 127 and 20. I hope this helps. If it still won't work, we need to investigate it in more detail.

Martin

Re: Jedicut and Arduino over USB

34
Hello,
Thank for answers : ]
Yes, I use the arduino code as it is. Here's my connections : I've adapted for the mm2001's DB25 connector...I think that's correct 8-)
[pre]
Arduino Nano DB 25
digital output female connector
D4 9 X2 step
D5 8 X2 direction
D6 7 Y2 step
D7 6 Y2 direction
D8 5 X1 step
D9 4 X1 direction
D10 3 Y1 step
D11 2 Y1 direction
D12 17 All motors On/Off
GND 18 to 25 Ground
[/pre]

My cutting speed is 127 and 60 for tests...

Re: Jedicut and Arduino over USB

36
vincent,

you can test it with a delay in arduino-code.

here the code:
"void handleCommand()
{

byte val = cmdArray[arrayIdxRead+1]; // The command parameter value
switch(cmdArray[arrayIdxRead])
{
case 'A': // All Motors on/off
if(val == '1') {digitalWrite(12, HIGH);}
else {digitalWrite(12, LOW);}
break;
case 'H': // Wire Heat
if(val > 0) {digitalWrite(3, LOW);}
else {digitalWrite(3, HIGH);}
break;
case 'M': // Motor step Command
sendMotorCmd(val);
sendMotorCmd(val); // send it a second time, because of timing problems with the mdlcnc
delayMicroseconds(50);
sendMotorCmd(0); // and turn motors off, falling edge of pulse
break;
case 'F': // Change the timer frequency, the time between two steps
if(val>127) val =127; // restrict from 0 to 127 corresponds to 1kHz to 0.5kHz
val = 127-val;
initTimerCount = val;
break;
}
"
the delay make the "high-time" for the step-impuls longer

Manfred

Re: Jedicut and Arduino over USB

37
Vincent, the available schematics for the mm2001 shows the following DB25 pin assignment:
[pre]
Step 1 pin 9
Dir 1 pin 2
Step 2 pin 7
Dir 2 pin 4
Step 3 pin 5
Dir 3 pin 6
Step 4 pin 3
Dir 4 pin 8
[/pre]
you mixed Step1/Dir4 Step2/Dir3 Step3/Dir2 Step4/Dir1 (the pin17 for On/Off is OK). You should wire it as I posted in the morning. And don't forget to make the port configuration as I showed to you, because the Bits in the Byte which is sent via the M command, needs to be in the correct order. Otherwise the Arduino pins will not correspond to the correct axis.
An additional thing may be the pulse width for stepping. I think you should try Manfreds example if it still doesn't work.

Martin

Re: Jedicut and Arduino over USB

40
Ok, I think this is my Part.

Let me explain first the Motor command. It consists of two bytes, an 'M' and a byte which corresponds to the 8 control bits of the motors. For each motor a step and a direction bit. The port configuration of jedicut let you assign the pins 2 to 9 of the parallel port to the step and direction bits of each motor. This 8 bits forms the byte of the motor command and the arduino have assigned for each bit a port number:

[pre]
Pin number in jedicut configuration Bit in motor byte Arduino Pin
Pin2 Bit0 D8
Pin3 Bit1 D9
Pin4 Bit2 D10
Pin5 Bit3 D11
Pin6 Bit4 D4
Pin7 Bit5 D5
Pin8 Bit6 D6
Pin9 Bit7 D7
[/pre]

Example: If you set in the jedicut port configuration for Engine X1 the Clock to 3, it will be sent in the byte of the motor command as bit 1 and will be output from arduino port D9. So the arduino port D9 needs to be wired to the input pin for X1/clock of your stepperboard (e.g. For the letmathe mdlcnc board it is pin 2).

All other pin assignments (for Engine On/off, Timer Pin, Heating Control Pin, etc) are not relevant, because for this purpose other commands are defined (e.g. 'A' for Engine on/off). The arduino code parses this command and outputs it on a port defined within the arduino code. E.g. in the current code the 'A' command operates the arduino port D12 and the 'H' command the port D3.
I hope this brings more light in the darkness of configuration.:)

Martin
`); }); })(jQuery, window, document, phpbb);