read data from labview visa

hi,i have a problem here,how can i read the input data from labview+visa using serial communication and show the result on the serial monitor?

if someone has the tutorial or better experience please help me :slight_smile:

regard,

how can i read the input data from labview+visa using serial communication and show the result on the serial monitor?

You can't. You can't use the one serial port to talk to labview and the serial monitor application.

PaulS:
You can't. You can't use the one serial port to talk to labview and the serial monitor application.

ok thanks for the answer Paul, but how about if i want to read the labview output to arduino,what must i do?

There are port monitoring programs that can run on a pc which will show the traffic on a serial port.

but how about if i want to read the labview output to arduino,what must i do?

Use Serial.available() to see how much data is available. Use Serial.read() whenever the answer is positive.

thanks for all suggest very helpful

if i want to read the labview output to arduino,what must i do?

Generally speaking you need to capture the data from labview, then do what is desired with the captured data. below is a simple example.

// zoomkat 8-6-10 serial I/O string test
// type a string in serial monitor. then send or enter
// for IDE 0019 and later

int ledPin = 13;
String readString;

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT); 
  Serial.println("serial on/off test 0021"); // so I can keep track
}

void loop() {

  while (Serial.available()) {
    delay(3);  
    char c = Serial.read();
    readString += c; 
  }

  if (readString.length() >0) {
    Serial.println(readString);

    if (readString == "on")     
    {
      digitalWrite(ledPin, HIGH);
      Serial.println("LED ON");
    }
    if (readString == "off")
    {
      digitalWrite(ledPin, LOW);
      Serial.println("LED OFF");
    }
    readString="";
  } 
}