how can i send 2 value serial

Hi,
I use visual basic 6 and arduino uno,
I need to send two number from vb6 to arduino first
and the arduino receive this 2 value then send to pc again .

from example:
in vb6 x= 44 and y= 55 ( I need to send 44 and 55 to arduino,)
when arduino receive 44 and 55 then resend to vb6.

please help me.

What do you know about sending serial with an arduino ? (I don't use VB6 so I won't talk about that)

At now this is my code for send 1 thing and receive:

void setup()
{
Serial.begin(9600);
}
void loop()
{
while(Serial.available()>0)
{
t=Serial.read();
switch(t)
{
case 'a': Serial.print (t); break;
}
}

i send number from vb6 to arduino, and arduino send to vb6 what receive.
not important if code in vb6 or other, if other i will try to convert to vb6, i need the idea of code, how can i send 2 thing.

Did you try google ?

yes, but i not found

Are you sending 44 as a string of two characters or as a single byte with the value 44? These require different approaches. You code only reads a single character.

I am working on a demo of how to do what you want (and similar stuff) which I hope to post later today.

...R

i need to send 44 as byte.
ok thank you.

My Project is cnc program, i need to send gcode to arduino and arduino take x y z g t f from pc and calculate

A single byte for a numeric value for a CNC machine implies very limited movement.
Did you really mean send 44 as a single byte, or as two ASCII characters with the values 0x34 0x34?

My demo sketch here might be useful.

...R

Or you could just use google like I suggested and click ON THE VERY FIRST LINK AT THE TOP OF THE PAGE
http://www.bing.com/search?q=arduino%20sending%20numbers%20via%20serial&pc=conduit&ptag=A91E91239E03241FF94F&form=CONBNT&conlogo=CT3210127

http://forum.arduino.cc/index.php/topic,99225.0.html

OR THIS USING VB
http://forum.arduino.cc/index.php/topic,40110.0.html