Author Topic: Robust Serial Communication  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Offline Md_AslamTopic starter

  • Contributor
  • Posts: 24
  • Country: in
Robust Serial Communication
« on: November 18, 2022, 04:46:49 am »
I have a device which communicates via RS-232 Port, there are some commands for reading and writing. To make the communication automatic I am using Python(PySerial Library) language, But I am facing a little problem while working, that is, initially everything works fine but after some time I get consistent error of communication failure. I searched a lot on the internet but did not found any relevant solution for that. Programming wise everything is correct from my side, maybe there are some issue with hardware I am not able to figure out.
So please help me to make a robust serial communication system.
Any SOP(Standard Operating Procedure) regarding serial communication programming would be highly appreciated.

PS: I am using USB to RS-232 Cable to connect my RS-232 device and PC.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: Robust Serial Communication
« Reply #1 on: November 18, 2022, 11:28:34 am »
I have a device which communicates via RS-232 Port, there are some commands for reading and writing. To make the communication automatic I am using Python(PySerial Library) language, But I am facing a little problem while working, that is, initially everything works fine but after some time I get consistent error of communication failure. I searched a lot on the internet but did not found any relevant solution for that. Programming wise everything is correct from my side, maybe there are some issue with hardware I am not able to figure out.
So please help me to make a robust serial communication system.
Any SOP(Standard Operating Procedure) regarding serial communication programming would be highly appreciated.

PS: I am using USB to RS-232 Cable to connect my RS-232 device and PC.

You can roll your own RS232 but you'll need to study the protocol first.   It is not that complicated though.

Some of the USB to RS-232 cables do not work as well as they should that could be the issue.  You may have to try a different brand.  Make sure they are the type that follow the true specs as some of them only work with a limited output voltage range.
 

Offline BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1201
  • Country: us
Re: Robust Serial Communication
« Reply #2 on: November 18, 2022, 09:02:17 pm »
Of course there could be problem with the software but as far as hardware wise if you use a USB to RS232 adapter the driver may go to sleep sometimes.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf