I have very low knowledge about ModBus controllers, I have a Protocol3 Controller System http://www.despatch.com/protocol3.aspx that I want to control using a Python GUI.
I know that I can control the Protocol3 via ModBus. My Protocol3 has an ethernet port and I can talk with the controller using their software, however, controller software is very limited and I want to take full control using Python.
Does anyone have a clue of how the ModBus works? Do I have to buy an ModBus controller to set is as Master and set my Protocol3 as Slave?
Thanks in advance
I have find an article that help me out to understand and write a pice of software to control my Despatch Protocol-3 ModBus Module.
https://github.com/sourceperl/pyModbusTCP using Python Module "PyModBusTCP" http://pymodbustcp.readthedocs.io/en/latest/ and Protocol3 programming guide.
I think I can close now this topic.
Thanks all for stop by.
Related
Operating system: MacOS
Just for some context on what I am trying to do, I have an Ikea standing desk which has bluetooth. I am able to control the desk with a built in app. I want to create a server running on a raspberry pi that connects to desk and controls it, I then want to create an Alexa skill which will control the desk by calling the server endpoints.
What's the best language/library you would suggest I use? Ideally something that would run on MacOS and Ubuntu.
I don't know anything about BLE yet which is why it is hard for me to find a good answer. If you have resources, books or tutorials that will help me get running with BLE please recommend them.
My use case:
Get desk to go up
Get desk to go down
Get current position of desk
If you want to write one app that works for both MacOS and Ubuntu then as ukBaz said, python and Bleak are your best options. If you want to use the native way of writing BLE apps for each OS, then you can use CoreBluetooth on MacOS and BlueZ on Ubuntu. The advantage of the former is that you can get an application up and running quickly, and the advantage of the latter is that you will find a lot more resources and advanced functionality.
Below are some resources that can help you in your development:-
Theoretical Bluetooth:
Bluetooth Low Energy: A Primer
Getting Started with Bluetooth Low Energy
Ellisys Bluetooth Series
CoreBluetooth
Getting Started with CoreBluetooth
Ultimate Guide to Apple's CoreBluetooth
iOS App Full Example
BlueZ
Configuring Bluetooth devices with bluetoothctl
Ubuntu: Accessing GATT services
Python
Ikea IDÅSEN desk API and CLI
Idasen controller example
Using Python for Bluetooth
Is it possible to write an API with Python so you can connect a physical ON and OFF switch via USB to a PC and when user presses the switch to ON or OFF, the python program detects it and send a signal to a web app and shows ON or OFF message on the website?
I am sorry if what I am asking its not clear enough!
Yes, it is possible. Reading USB devices can be done with Python. In linux USB device inputs can be found in some files(e.g. /dev/ttyUSB0). By reading those files you can get the information that you need. Putting here link that will be helpful
similar post
Firstly, you can't write an API to interact with hardware in python. You would have to use the pre-existing windows API(or the API provided by the Operating system that you are using) in order to interact with hardware in such a high-level language.
If you want to interact with hardware in python, and detect switch presses, releases etc, I would recommend you used a microcontroller such as a raspberry pi(for python) or an arduino(for C++). The respberry pi provides a very easy way to interact with hardware in python. If you still want to interact with a USB stick in python(but not acting as a switch) you can use the pyusb library.
i was developing some application in java on a pi. One part of of the application exchanges data via modbus tcp, therefore i must implement a modbus tcp slave.
There are further points, that make that situation a little bit difficult. The server should support different user ids and modbus register maps that should not be built of thousands of fake registers.
First i experimented with jamod, which is good for the master part of my modbus application, but has problems with different user ids and i didn't figure out how to create registers with specified addresses.
Now i realized that the modbus slave must not be part of my java application. I'm searching a stabile running, testet software for raspbian, which fulfills my requirements. I found very much testing software implemented in python, c and many other languages.
Can you give me some advise, which software could be a good solution for me.
I have to use the HC-06 bluetooth module (the one usually used for arduino projects) with a de0-nano altera fpga kit.
I really have no idea how to go about it. Am I suposed to treat the HC-06 as a simple serial port and just implement the UART communication? I have to develop a verilog design for it.
Apparently the communication with HC-06 and the FPGA must happen over a UART interface. so, go ahead and write some logic to implement UART on FPGA so the communication can take place. In the process of doing so, a lot of things will get clear for you.
Does this look like doYourHomeWork.com? lol I would start here.
They have some examples of connecting hc's to different systems, and it's only 16 pages with loads of pictures.
edit: Additionally this provides some great information about working with your hc chip in the context of arduino. As far as how things are done (enter at mode etc...) It explains nicely.
I developing one j2me application for read value from power meter over modbus protocol serial communication. I have code here to read Holding register but m not getting response from meter.so.
Is there any Modbus library for j2me?
Help me please.
Thanks in advance.
A known and mature MODBUS commercial library for Windows and Linux is for example, SuperCom. A commercial software library that offers MODBUS for serial and TCP data communications and includes many MODBUS variations too. Client (Master) and Slave functionality also included. And it offers many samples for well known compilers (more).
There surely exist more commercial solutions there.