Hi all , i a learning the serial comm of arduino now , i started with a simple code :
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.write(3);
delay(2000);
}
just writing 3 to the serial port continuously with delay of 2 sec
when i download the prog to arduino Uno i can see the Tx LED flashing with the indicated delay
if i unplug the USB and put it back it doesn't work , even if i press reset
it works only when i activate the serial monitor or re download it
Yes Graynomad ,
As the blinking is my indication it is sending
u C i am trying to connect it to a plc and i want to know why i am not receiving the data
so i have to make sure the arduino is sending then i check the PLC side
it does ptint 3 every 2 sec
but this sending is happening only when the serial monitor is on
when i am connecting to another device how can i trigger the arduino to send the same way ?
but this sending is happening only when the serial monitor is on
No, it's happening whenever your program is running, the fact that you aren't looking at the output on the serial monitor some of the time is irrelevant.
What device? Data sheet? How are you connecting to it? What data does the device expect? Does the device use RS232 or TTL voltage levels?
i can't see thr Tx flashing
the device is Mitsubishi FX3u 32MR PLC wih serial adapter FX3U-232-BD
the signal of this serial adapter is 0-5vdc so no voltage level difference
i am trying to send a number from the arduino working as user interface to the PLC indicating a choice of process
in another part the arduino will collect other data from the PLC
i think i have to send the data as 1 byte and in binary mode
i set the PLC to 8 bit mode .parity none , 1 stop bit and non protocol communication
i am using TX ,RX and Ground on both sides PLC and Arduino
Computer link
Data transfer between PLC and computer (specified as the master station) via dedicated protocol.
Non-protocol communication
Serial communication between PLC and RS-232C device via non-protocol.
Any idea what that means?
FX Series User’s Manual - Data Communication Edition JY997D16901
MODEL CODE: 09R715
Explains N:N network, Parallel Link, Computer Link, Non-Protocol communication by RS and RS2 instructions/FX2N-
232IF
I think you need this.
It also looks like the RS232 link uses hardware handshaking.
i read this i even used communication example of RS command in this project
Care to share?
Are you saying that the example only showed sending a '3'? Hard to believe but possible.
As for the handshaking, I haven't dealt with that for 20-odd years and I can't remember what does what these days. You could probably get away with tying a couple of lines to active levels or together, the signals in question are CD, DTR and DSR.
But without the access to the proper protocol spec I see little point in carrying on.
Hi,
I also had this problem that Arduino serial is not read by some devices because it is not "real" rs232.
I had to get a component that would clean up the arduino serial, like this $2.50 component on ebay:
Hi Paul ,
do you mean by not "real" rs232 the signal voltage level ? cos i checked with the PLC manufacturer and its signal is 0-5V DC
or is it a protocol matter as Rob mentioned ?
can you tell me the devices you tried to connect with
I just finished my communication project between Aduino Uno R3 with FX1N-232-BD RS232 COMMUNICATION BOARD (OPTION) MITSUBISHI PLC Model: FX1S-30MR. If you still need some help, please do not hesitate to post again I will give you some useful of technical information.