Hello Guest it is April 25, 2024, 10:41:26 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 - aluplastvz

Pages: « 1 2 3 4 5 »
31
whether you are able to do load g code using an external button I have to find a way to quickly load code
greeting

32
General Mach Discussion / Re: RS232 fro gcode to serial port
« on: April 19, 2015, 10:49:23 AM »
Is it possible to send a file directly in some way
  (eg x500 Y300
x200 Y600
x400 Y900 ..
.....
....)
in Mach3 ekran.Da avoid loadfile ....
for faster load when changing G code several times in a short time.
I need this machine for bending tubes where Mach3 use as a controller of length and angle of a plc doing valve control
greeting

33
Modbus / Re: Simple tutorial on analog inputs with Arduino
« on: April 13, 2015, 12:02:29 PM »
I managed to put together two programs diginput 8 + 2analog
x + .x-.y + .y-.z + .z-.start, stop spindle% + -, feed rate + -


34
Modbus / Re: My experiments with Mach3 ModBus and Arduino, Part I
« on: April 12, 2015, 05:03:45 PM »
if you have some code for arduino mega who might share
greeting

35
Modbus / Re: My experiments with Mach3 ModBus and Arduino, Part I
« on: April 10, 2015, 01:28:01 PM »
how to increase the number of inputs
greeting

36
Modbus / Re: Simple tutorial on analog inputs with Arduino
« on: April 10, 2015, 12:31:07 PM »
Regards To Far
I'm sad I did not understand
I want 2 analog inputs for potenciometa like you do and I make the 10 input.
Arduino cod 10 input functions
You with 2 analog inputs function. how to put them into one program Arduino cod
Brain is not a problem
Sorry for my bad english
greeting

37
Modbus / Re: Simple tutorial on analog inputs with Arduino
« on: April 10, 2015, 07:51:01 AM »
Do I want to have foreign keys and 2 analog like you did in your case
thank you
greeting

38
Modbus / Re: Simple tutorial on analog inputs with Arduino
« on: April 09, 2015, 04:08:34 PM »
Hello Zafar
how to connect your analog input with this code
greeting


unsigned int CRC16, SEED, GP; //for CRC16
#define SEED 0xFFFF  //initialization for CRC16
#define GP   0xA001  //generating polynomial
int in_buffer[8]; // receiving buffer

#define CycleStart 2;  //MOD:0-D0
#define FeedHold 3;  //MOD:0-D1
#define StopFile 4;  //MOD:0-D2
#define SingleStep 5;  //MOD:0-D3
#define ResumeFile 6;  //MOD:0-D4
#define ZeroX 7;  //MOD:0-D5
#define ZeroY 8;  //MOD:0-D6
#define ZeroZ 9;  //MOD:0-D7


void setup()
{
  Serial.begin(9600);            // Init serial communication
  pinMode(2, INPUT);           // Set pin to input
  pinMode(3, INPUT);           // Set pin to input
  pinMode(4, INPUT);           // Set pin to input
  pinMode(5, INPUT);           // Set pin to input
  pinMode(6, INPUT);           // Set pin to input
  pinMode(7, INPUT);           // Set pin to input
  pinMode(8, INPUT);           // Set pin to input
  pinMode(9, INPUT);           // Set pin to input
  digitalWrite(2, HIGH);       // Turn on pullup resistor
  digitalWrite(3, HIGH);       // Turn on pullup resistor
  digitalWrite(4, HIGH);       // Turn on pullup resistor
  digitalWrite(5, HIGH);       // Turn on pullup resistor
  digitalWrite(6, HIGH);       // Turn on pullup resistor
  digitalWrite(7, HIGH);       // Turn on pullup resistor
  digitalWrite(8, HIGH);       // Turn on pullup resistor
  digitalWrite(9, HIGH);       // Turn on pullup resistor
}

void loop()
{
   if ( Serial.available() == 8 ) {
     
     // read ModBus command from Mach3
     for (int i=0; i < 8; i++) in_buffer[ i ] = Serial.read();
     
     if ((in_buffer[0]== 0x01)&(in_buffer[1]== 0x04))
         Reply_Inputs();
         else
         Reply_Error();
         
     Serial.flush();
 
   }   
}

/// ----------------------- Functions -----------------------
void Reply_Inputs()
{
   CRC16 = SEED;
   int Inputs[] ={0x01, 0x04, 0x0A, 0x00, 0x00,
                  0x00, 0x00, 0x00, 0x00, 0x00,
                  0x00, 0x00, 0x00, 0x00, 0x00};

   Inputs[4] = (
               ((!digitalRead(9))<<7) |
               ((!digitalRead(8))<<6) |
               ((!digitalRead(7))<<5) |
               ((!digitalRead(6))<<4) |
               ((!digitalRead(5))<<3) |
               ((!digitalRead(4))<<2) |
               ((!digitalRead(3))<<1) |
               ((!digitalRead(2))   ) );

   for (int i = 0; i < 13; i++)
        {   
        Calc_CRC(Inputs, &CRC16);
        }     
       
        Inputs[13]=CRC16;
        CRC16=CRC16>>8;
        Inputs[14]=CRC16;
   
   for (int i=0; i < 15; i++) Serial.write(Inputs);
}
/// ---------------------------------------------------------
void Reply_Error()
{
   int Error[] ={0x01, 0x84, 0x00, 0x43, 0x00};
   for (int i=0; i < 5; i++) Serial.write(Error);
}
/// ---------------------------------------------------------
void Calc_CRC(unsigned char b, unsigned int* CRC)
{
   int carry, i;

   CRC[0] ^= b & 0xFF;
   for (i=0; i<8; i++)
   {
      carry = CRC[0] & 0x0001;
      CRC[0]>>=1;
      if (carry) CRC[0] ^= GP;
   }
}
/// ---------------------------------------------------------

39
Modbus / FATEK Modbus
« on: June 04, 2014, 09:12:33 AM »
Please give your someone can give me an example of how to do Modbus communication with the PLC FATEK how to fill a table and an example.
I do know how to spell brain. built a MTBus 1408 and it works great

40
to look like brain that would compare encoder and line g coda

greeting

Pages: « 1 2 3 4 5 »