Chroma Programmmable AC Source about

hello I have a "Chroma 6560 Programmmable AC Source" device. I connected my device over RS232 serial commination, but I send and apply all kinds of data, no problem.
In no query "* IDN?" , "V?" I can't get back?
What could be the reason?
The code I use is classic SoftwareSerialExample.
I have tried through other Putty, Teraterm programs, all of them answer the questioning, there is no problem "RX, TX" as hardware. : Smiley-şaşırtmak:

futi40:
What could be the reason?

Your code is wrong.

.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
// Open serial communications and wait for port to open:
Serial.begin(19200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

Serial.println("Goodnight moon!");

// set the data rate for the SoftwareSerial port
mySerial.begin(19200);
//mySerial.println("Hello, world?");
}

void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}

ieee488:
Your code is wrong.

.

void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}

I tried with two different cables. RX only, TX communication ends my device "?" is inadequate at polling command,
How to use RS232 other terminals with arduino? Scheme etc. is there?

How should other ends (RS232) be connected to the hardware?

TeraTerm or something like it on PC <---> USB to RS232 cable <---> Chroma AC source

Get that working first !

You have changed everything. Get back to working connection.

With TeraTerm, everything works properly, very correctly. No problem.
Query commands return answers.

Probably you are not sending a carriage return or line feed that the instrument wants.

.

if (Serial.available()) {
mySerial.write(Serial.read());
}

How do I add line and carriage return to the above code?

futi:
if (Serial.available()) {
mySerial.write(Serial.read());
}

How do I add line and carriage return to the above code?

You add carriage return and/or line feed after all the bytes are sent.
Right now, you simply are sending each byte as you are receiving it.

You have no way of knowing when all the bytes have been received.

You are going to have to do some work on this instead of merely copying someone else's code.

.

I also received the bytes one by one.
"-1" is coming?

futi:
I also received the bytes one by one.
"-1" is coming?

what?

I get the bytes one by one.
Returns serial "-1" in response

sorry, my main problem is not being able to use rts, cts lines, because i have determined it definitively, I have separated connections other than rs232 rx tx lines through a working Java program. the result was negative. I got the same result like the arduino. so i confirmed.