Given you got the data from the FPTC indicator, what do you plan to do with it in the Arduino?
What type of Arduino do you plan to use?
The RS-485 module can be connected to the Arduino like this:
Arduino RS-485
TX - DI
RX - RO
D4 - DE & RE
RS-485 is just a physical interface standard. It does not include the protocol to be talked. Your devices seems to talk ModBus. There are several implementations of ModBus for the Arduino platform. I'm using https://github.com/smarmengol/Modbus-Master-Slave-for-Arduino. If I interpret the documentaiton of your device correctly you might have to tweak the library a bit to support the high register numbers it uses but that should be quite easy. You may also try one of the other libraries out there. But be warned: I've found none that doesn't have errors in it.
Thank you all.
The solution was to configure the indicator so that it had continuous communication.
And using this simple code:
#define transmitir 2
void setup(){
Serial3.begin(9600,SERIAL_8O1); //Initialize serial communication
Serial.begin(9600,SERIAL_8O1);
pinMode(transmitir,OUTPUT);
digitalWrite(transmitir,LOW);
}
0JavierContreras1, you don't seem to answer questions asked from you which are asked so that we can better understand to help you.
Pylon asked you:
Given you got the data from the FPTC indicator, what do you plan to do with it in the Arduino?
The question is important.
If you simply wish to display it on a LCD then the task is simple, but if you which to do some further numerical crunching then you need to convert the data you have which is as data type char to some numerical data type such as float or int.
You also need to confirm if the setup you are using on your arduino, as in serial parameters match the unit. From looking at you code your Arduino is set to for 9600 8 data bits odd parity and 1 stop bit.
Can you confirm that the load cell display has these same serial parameters ?
Basically, you need to be very clear and concise and much more detailed when you write on this forum and want some one to really help you.
Essentially most of us totally dislike making assumptions and guessing, so, be good and spend time detailing your situation. Also, use code tags to display your code and a separate section say using quote tags for any serial output you get, rather than how you do above.
To offer you some help, setup a char buffer of 16 chars and construct your code to fill this buffer up for each reception of one reading. Then you simply point to the location in that buffer where the actual reading starts and then develop code to deal with the data in the way you want or need.
Look at examples and also in the playground on this site for all sorts of guides which will help you learn and get what you want. We prefer to see you learn and show some effort in trying things out for yourself.