Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication between modbus and MQTT from a PLC or VFD #202

Open
CesarCastillo-90 opened this issue Dec 14, 2020 · 13 comments
Open

Communication between modbus and MQTT from a PLC or VFD #202

CesarCastillo-90 opened this issue Dec 14, 2020 · 13 comments
Labels
question Further information is requested

Comments

@CesarCastillo-90
Copy link

Hello everyone, I hope you are well. I have managed to successfully integrate the ModbusPal emulator with EdgeX Foundry's modbus microservice. However, I have doubts about integrating any device with and seeing the results through MQTT. On the other hand, data management has been carried out from the southern border to the northern border, but I have not been able to communicate in the opposite direction. If anyone knows how to do this, I will be grateful. I look forward to your valuable comments, have a great day.

@CesarCastillo-90 CesarCastillo-90 changed the title Communication between modbus and MQTT from a PLC o VFD Communication between modbus and MQTT from a PLC or VFD Dec 14, 2020
@cloudxxx8 cloudxxx8 added the question Further information is requested label Dec 14, 2020
@CesarCastillo-90
Copy link
Author

ok @cloudxxx8, How can I communicate a PLC by MODBUS protocol to MQTT through EdgeX Foundry and in turn to write data from MQTT to PLC? Thank you so much!

@cloudxxx8
Copy link
Member

You could set up two App Services, one for exporting PLC data to MQTT broker, and another receiving MQTT message and send http command to Core Command service.

@CesarCastillo-90
Copy link
Author

Hi mr. @cloudxxx8, could you guide me in this?, I'm using docker compose hanoi
docker-compose-hanoi-arm64.zip

@weichou1229
Copy link
Member

If you want to push data to northbound's MQTT broker, you can try something like AppServiceConfigurable's mqttsend
https://docs.edgexfoundry.org/1.3/microservices/application/AppServiceConfigurable/#mqttsend

@CesarCastillo-90
Copy link
Author

Hi mr. @weichou1229, I have communication from the south border to the north via MQTT, however I do not have the opposite direction. If you can guide me in this regard, I would be grateful.

@weichou1229
Copy link
Member

weichou1229 commented Dec 17, 2020

You can execute read/write command via core-command service,
see example https://docs.edgexfoundry.org/1.2/examples/Ch-ExamplesAddingModbusDevice/#execute-commands

@CesarCastillo-90
Copy link
Author

ok mr. @weichou1229, I go to see it, thank you so much!

@weichou1229
Copy link
Member

I don't know how to write data as a publisher to the MQTT broker to see it reflected in the ModbusPal emulator

Currently, App-Service-Configurable doesn't provide such feature, but you can create one for yourself. The introduction and example link can refer to https://github.com/edgexfoundry/app-functions-sdk-go/blob/master/README.md

@CesarCastillo-90
Copy link
Author

ok mr. @weichou1229 thank you for your help.

@CesarCastillo-90
Copy link
Author

Understood, I will do tests, if I have any concerns I will consult you again, thank you very much mr. @weichou1229.

@karima-se
Copy link

Hello @weichou1229 , would you like guid me to send data obtaned from ModbusPal simulator to MQTT broker please, I am using Irland version(v 2.0), I would be grateful.

@karima-se
Copy link

Hello @CesarCastillo-90 , I am trying to do the same thing as you but I can't send the data obtained from ModbusPal to mqtt broker, would you like give me some advice? I would be grateful.

@weichou1229
Copy link
Member

The compose-builder can setup a app service to export events to MQTT broker
https://github.com/edgexfoundry/edgex-compose/tree/main/compose-builder

add-asc-mqtt-export.yml Application Service Configurable extending compose file, which adds the App Service MQTT Export service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants