Melsec Serial Communication Python

Programmable Controllers MELSEC. The MELSEC Series takes control to the next level. • Serial communication • FL-net(OPCN-2) • AS-i; Engineering Software.

Active11 months ago

Can someone please show me a full python sample code that uses pyserial, i have the package and am wondering how to send the AT commands and read them back!

Willi Mentzel
12.3k11 gold badges58 silver badges79 bronze badges
GathGath
5873 gold badges11 silver badges14 bronze badges

closed as off-topic by Drew, miken32, Machavity, doelleri, CerebralFartOct 24 '16 at 17:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – Drew, miken32, Machavity, doelleri, CerebralFart
If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

FramesterFramester
12k36 gold badges108 silver badges176 bronze badges

use https://pythonhosted.org/pyserial/ for more examples

Vatev
6,3651 gold badge25 silver badges35 bronze badges
baydabayda
10.7k6 gold badges33 silver badges48 bronze badges

Serial Communication Rs232

engasoengaso

What Is Serial Communication

I have not used pyserial but based on the API documentation at https://pyserial.readthedocs.io/en/latest/shortintro.html it seems like a very nice interface. It might be worth double-checking the specification for AT commands of the device/radio/whatever you are dealing with.

Specifically, some require some period of silence before and/or after the AT command for it to enter into command mode. I have encountered some which do not like reads of the response without some delay first.

Paul OsbornePaul Osborne
3,2585 gold badges19 silver badges18 bronze badges

Melsec Serial Communication Python Linux

Not the answer you're looking for? Browse other questions tagged pythonmodempyserial or ask your own question.

Melsec Serial Communication Python

Sometimes when working on an Ardunio project, it is necessary to send data back and forth between a computer. Now, you could use something like the arduino ethernet shield, which would send data over a network, but if you want something easy and free the simplest solution is USB communication.

There are several ways to approach Ardunio USB communication, but in this case we will be using Python on the computer side to send and receive information. As such, this instructable expects that you have some prior knowledge of Ardunio, and of Python (or other similar scripting language).

Why Python?

Python is a versatile, easy to learn, and easy to use scripting language. Its power, and huge library of user-created modules (everything from keyboard emulation to game programming) makes it an ideal language for a wide verity of computer side tasks. You could easy parse network information and make an Arduino visualizer, create a game controller, or make a keypad computer login system. Arduino with Python opens up a word of possibilities.