I am new to Arduino and want to know if it is possible to send a message request to a devise (Via Ethernet), receive a response, store the ascii message (2000 characters typical) segment the message into 4, 500 character messages and send the new messages to another device sequentially? I am doing it now between a Unitronics PLC and specialized printer but the Unitronics message buffer is limited to 500 characters.. I need to put something in between the Unitronics PLC and printer to assist in getting the 2000 character message into the Unitronics in 4 segments.. Can the Uno with Ethernet shield accomplish this and if so, any suggestions...
The Uno is based on an atmega328 which has 2048 bytes of RAM. I think you'll find having only 48 bytes left over is going to be a problem.
Thank you. But 1 byte = 2 ascii charcters, correct? So then I have 1048 bytes left???
BigBadJohn:
Thank you. But 1 byte = 2 ascii charcters, correct? So then I have 1048 bytes left???
No 1 byte = 1 ascii character. I imagine you could manually compress it to just the printable characters as you are reading it, but it will make it harder to process. Bear in mind the ethernet processing libraries will also consume a good deal of memory. Now, if you connect a SD/micro-SD card you could read a bunch of bytes, and store them to SD card and process them in pieces.
However, if what you are doing is spooling characters and don't have real time components (like running a motor), it will be much simpler to use a Rasberry Pi, which has much more memory and has a built in ethernet port. The programming is somewhat different than Arduinos, but I suspect over all it would be a lot easier to use a Pi, than trying to shoehorn the code into an Arduino. An R-pi would also tend to be cheaper than an Arduino + Ethernet shield.
Alternatively, use an Arduino with more RAM.
Thanks to everyone for the input but I guess alternatively I could use the Arduino Due, that will have all the memory I should need.. I think...