Capture Large RS-232 Data Stream
Capture Large RS-232 Data Stream
(OP)
Hello,
I am relatively new to PLC. I'm well versed in electronics, just not so much PLCs. I was hoping you all could provide me with some direction.
We are trying to capture a long data stream via RS-232. We send a request for data byte. Then come up to 200 bytes of data (length is known ahead of time). We are using the Automation Direct Productivity 2000 Series PLC. The challenge is that it only has a 128 byte data buffer. We are able to capture some data, but a lot of times we miss a data frame due to some missed data points. Our speed then suffers. Maybe 3 data frames per second.
So, from an experienced PLC programmer's experience, should this be something that can easily be done with ladder logic? Or, is there some sort of intermediary device that will buffer the data for us?
Asynchronous communication seems to be the easiest to implement. I'm guessing the best way is through a converter module. If so, any recommendations on a decent device for this?
One more thing, using Serial TTL 0-5 vs the RS-232 +/-15V would also make my life easier.
I am relatively new to PLC. I'm well versed in electronics, just not so much PLCs. I was hoping you all could provide me with some direction.
We are trying to capture a long data stream via RS-232. We send a request for data byte. Then come up to 200 bytes of data (length is known ahead of time). We are using the Automation Direct Productivity 2000 Series PLC. The challenge is that it only has a 128 byte data buffer. We are able to capture some data, but a lot of times we miss a data frame due to some missed data points. Our speed then suffers. Maybe 3 data frames per second.
So, from an experienced PLC programmer's experience, should this be something that can easily be done with ladder logic? Or, is there some sort of intermediary device that will buffer the data for us?
Asynchronous communication seems to be the easiest to implement. I'm guessing the best way is through a converter module. If so, any recommendations on a decent device for this?
One more thing, using Serial TTL 0-5 vs the RS-232 +/-15V would also make my life easier.
RE: Capture Large RS-232 Data Stream
What are you talking to that barfs out 200 bytes a request?
What is the data rate?
Is there no provision for communications handshaking? No RTS line? No XOFF/XON function available?
===========
0-5V serial is good for 3 to 5 feet inside the same enclosure surrounded by the same grounding.
Keith Cress
kcress - http://www.flaminsystems.com
RE: Capture Large RS-232 Data Stream
Thanks for your response. We are communicating with an electronic controller. The PLC is intended for an End of Assembly test. It simulates the application and constantly monitors feedback from the data stream. It's a proprietary system.
There is no handshaking. No RTS, etc. It's basic UART. Data rate is 38.4k.
The 0-5V length is limited to a specific installation, but we have that under control. That is simply how things are typically done with low cost microcontrollers. The addl. hardware cost for real RS-232 are not justified.
We were able to wrangle the PLC to get data. And it is almost acceptable, but I prefer an easier solution for future applications if possible. For example, when our Windows-based software communicates with the boards, we use an FTDI cable/IC. It has USB to serial converter (TTL) on it. The key is that it has a buffer of at least 1kB for the Rx side. That way, we can take in the serial data onto the PC "whenever we are ready for it".
Is there a device that would do the same? Some send byte request via ethernet or similar... and then some receieve request command via ethernet? It should have capability to clear the buffer as well.
RE: Capture Large RS-232 Data Stream
https://www.keelog.com/serial-logger/
and so forth
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm
RE: Capture Large RS-232 Data Stream
These things need buffering to handle rate conversions. You use the same rates but use the handshaking available to control the data coming into the PLC to a speed or data block size that's usable. This handles the crude (stupid) handshakeless instrument output you have to contend with.
ANother flavor
Keith Cress
kcress - http://www.flaminsystems.com
RE: Capture Large RS-232 Data Stream
RE: Capture Large RS-232 Data Stream
Google searches have decayed over the years into something akin to searching for a snake while looking thru a straw.
Keith Cress
kcress - http://www.flaminsystems.com
RE: Capture Large RS-232 Data Stream
RE: Capture Large RS-232 Data Stream
Keith Cress
kcress - http://www.flaminsystems.com
RE: Capture Large RS-232 Data Stream
After a while it seems like it is asking a Genie for a magic wish and not being sufficiently specific, ending with an undesired result. I have had occasion to play this search game for a while before hitting on the correct combination of search terms. This is where metadata searches could help = for example, asking for answers to be drawn from "network integration" areas. Unfortunately, getting people to correctly apply metadata is nearly impossible.
Edit to add - using negative terms can also help. Such as "-circuit" to eliminate serial buffer circuit designs.
RE: Capture Large RS-232 Data Stream
Then get familiar with the program Putty (hyper terminal old days windows 2000 or before) or similar serial data display programs. Maybe lab view has this RS232 interface for capturing data? Most interfaces anymore are ethernet, so don't let any vendor sell you an antiquated RS232 system as an interface. Or just specify the interface you need.
RE: Capture Large RS-232 Data Stream
Gunnar Englund
www.gke.org
--------------------------------------
Half full - Half empty? I don't mind. It's what in it that counts.
RE: Capture Large RS-232 Data Stream
With micro controllers, at least for us, everything is still UART (~RS-232) or CANbus. Sometimes K-Line. A CANbus chip is like $0.30. UART is essentially free! So for a low cost device, UART is the way to go. Mostly for engineering use or factory diagnostics.
In the past, I've created test stations using custom PCBs and Windows I/O modules. The problem is extensibility. Add an extra function, and you need a new PCB. So, we started venturing into PLCS. Since everyone and their mom uses PLCs, we thought it's time to go that way. At this point, I'm not sure it's really any easier in the end, just different...
So, there's a bit of a learning curve here. I appreciate the advice so far.
RE: Capture Large RS-232 Data Stream
To me, the description sounds like not using the correct PLC, rather than a problem with PLCs overall. There's quite a few PLCs that handle serial communications, normally they're a lot more expensive than the Automation Direct ones. I've seen instances of using ladder logic and specific instruction sets to manage the buffer, but a lot of the time its not worth the development effort to get the lower specification PLC to do the job compared to buying a higher specification unit.
This might well be a good example for an Arduino application.
EDMS Australia
RE: Capture Large RS-232 Data Stream
RE: Capture Large RS-232 Data Stream
Keith Cress
kcress - http://www.flaminsystems.com