Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Slave Mode #2

Open
hallard opened this issue Oct 24, 2018 · 6 comments
Open

Slave Mode #2

hallard opened this issue Oct 24, 2018 · 6 comments

Comments

@hallard
Copy link

hallard commented Oct 24, 2018

Is there any implementation of a slave mode in the pipe ?

@giampiero7
Copy link
Contributor

Hi,
In this fork:
https://github.com/sfera-labs/pycom-modbus
You can find slave functionalities for Modbus RTU.

It is not yet documented, but it is not hard to figure how it works.

The entry point is Serial.get_request(unit_addr_list, timeout) to call in a loop, where unit_addr_list is the list of addresses you want to receive requests for, and timeout is the time the method will wait for a request before returning anyway.

Once, you get a Request, you use its methods to read the request's data and send a response or an error.

Hope it helps...

@hallard
Copy link
Author

hallard commented Oct 24, 2018

Awesome, thanks, I'll try that ASAP

@johncaipa
Copy link

johncaipa commented Dec 9, 2018

Hi, some can you share an example for slave mode functionality?

@johncaipa
Copy link

Awesome, thanks, I'll try that ASAP
@hallard @giampiero7 can you share a basic example for slave mode functionality? thanks

@giampiero7
Copy link
Contributor

@kiran007francis
Copy link

Hai,

Board: Esp8266
IDE: uPyCraft V1.0

Hai,

My name is Kiran Francis and i am new to micropython. I have medium experiencein python and is currently working on project that involves modbus communication. We are shifting the entire code to micropython and i came across this library for modbus. But i am stuck with an error. Whenever i burn the code to esp8266, I get the following issue

image

Issue: MemoryError: memory allocation failed, allocating 8960 bytes

Do you know anything regarding this issue. I hope to get a reply from you soon.

Regards,
Kiran Francis

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants