serial script communication to XY table

I am currently sending position and relay switch commands to an XY table using a script in Hyperterminal. Is it feasable to run such a sketch from arduino as a standalone device, without a PC?

This is an example of the commands sent from hyperterminal.
set_rack(1,40)
set_rack(2,40)
set_rack(3,40)
move_sample(1,1)
relay_write(a,1)
relay_write(a,0)
move_sample(1,2)
relay_write(a,1)
relay_write(a,0)
move_sample(1,3)
relay_write(a,1)
relay_write(a,0)
move_sample(1,4)
relay_write(a,1)
relay_write(a,0)
move_sample(1,5)
relay_write(a,1)
relay_write(a,0)
move_sample(1,6)

I am using a UNO board , and have tried connecting it from RS232 pins 0 and 1 through an RS232 interface board.
I have tried the following sketch utilising the "serial print" command without success ( a shortenened version)

const int A=5000;//set delay
const int B=5000;//set delay
const int C=5000;//set delay
//
void setup() { 
 //Initialize serial and wait for port to open:
  Serial.begin(9600); 
}
  void loop() { 
  // prints value unaltered, i.e. the raw binary version of the 
   // byte. The serial monitor interprets all bytes as ASCII, 
Serial.print("set_rack(1,40)");
Serial.print("set_rack(2,40)");
Serial.print("set_rack(3,40)");
Serial.print("move_sample(1,1)");
delay(A);
Serial.print("relay_write(a,1)");
delay(B);
Serial.print("relay_write(a,0)");
delay(C);
Serial.print("move_sample(1,2)");
delay(A);
Serial.print("relay_write(a,1)");
delay(B);
Serial.print("relay_write(a,0)");
delay(C);
Serial.print("move_sample(1,3)");
}

Is it feasable to run such a sketch from arduino as a standalone device, without a PC?

Yes but if your table has a USB input then you need to get a USB host interface on your arduino. There are shields for this.

click the MODIFY button in the upper right of the post window.
Highlight all you code.
click the "#" CODE TAGS button on the toolbar above just to the left of the QUOTE button.
click SAVE (at the bottom).
When you post code on the forum, please make a habit of using the code tags "#" button.

Two points.

  1. Is your table an RS232 system running at 9600 baud?
  2. The code
Serial.print("set_rack(1,40)");

Sends no new line control codes try:-

Serial.println("set_rack(1,40)");