This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus profile generator
#4
(08.12.2020, 12:06)Daniel. Wrote: If somebody struggle to play directly with json file here is Excel file where you can just fill it in and generate the profile.



The json file will be created in the same folder where the Profile generator is and it will have the same name, you can change the name as you want.
Make sure to enable Macros in Excel!
For custom values just create new sheet and create a table for enumeration, Put the sheet name in the value_custom cell.
If you need additional parameters just rename spare column name to needed parameter name and start filling it in. 
Modbus documentation is here https://openrb.com/docs/modbus.htm

Hi Daniel

Great tool!
I have one problem though. I have added addresses for a device where there are several custom values. I have added one sheet for each table of enumeration and entered the sheet name in the cell of respective address.

When I run the macro I get an error in the subfunction, saying the subscript is out of range and highlighting the line number 3 in the below code.

Any good idea of what I do wrong?
Code:
Function customValues2Dict(WorksheetName As String)
    Dim jsonCustomValues As New Dictionary
    Worksheets(WorksheetName).Activate
    NumRows = Range("A1", Range("A1").End(xlDown)).Rows.Count
    For Row = 1 To NumRows
        jsonCustomValues(Cells(Row, 1)) = Cells(Row, 2)
    Next Row
    Set customValues2Dict = jsonCustomValues
End Function
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply


Messages In This Thread
Modbus profile generator - by Daniel - 08.12.2020, 12:06
RE: Modbus profile generator - by tomnord - 08.12.2020, 15:34
RE: Modbus profile generator - by JRP - 09.12.2020, 10:17
RE: Modbus profile generator - by Trond Hoyem - 21.12.2020, 15:10
RE: Modbus profile generator - by Daniel - 21.12.2020, 15:13
RE: Modbus profile generator - by Trond Hoyem - 22.12.2020, 06:23
RE: Modbus profile generator - by JRP - 29.04.2021, 09:23
RE: Modbus profile generator - by Daniel - 29.04.2021, 09:44
RE: Modbus profile generator - by JRP - 29.04.2021, 09:52
RE: Modbus profile generator - by gdimaria - 17.11.2021, 14:30
RE: Modbus profile generator - by Daniel - 17.11.2021, 14:36
RE: Modbus profile generator - by gdimaria - 17.11.2021, 14:40
RE: Modbus profile generator - by Daniel - 17.11.2021, 14:47
RE: Modbus profile generator - by gdimaria - 17.11.2021, 14:51
RE: Modbus profile generator - by admin - 17.11.2021, 14:52
RE: Modbus profile generator - by gdimaria - 17.11.2021, 14:57
RE: Modbus profile generator - by gdimaria - 17.11.2021, 15:57
RE: Modbus profile generator - by Daniel - 18.11.2021, 10:01
RE: Modbus profile generator - by gdimaria - 18.11.2021, 16:01
RE: Modbus profile generator - by Ian@GWTi - 21.01.2022, 14:50
RE: Modbus profile generator - by Daniel - 21.01.2022, 14:52
RE: Modbus profile generator - by domotiqa - 30.03.2022, 16:37
RE: Modbus profile generator - by mkaymak - 22.06.2022, 06:40
RE: Modbus profile generator - by Daniel - 22.06.2022, 07:29
RE: Modbus profile generator - by admin - 22.06.2022, 08:07
RE: Modbus profile generator - by mkaymak - 30.06.2022, 07:51
RE: Modbus profile generator - by admin - 30.06.2022, 10:28
RE: Modbus profile generator - by mkaymak - 30.06.2022, 10:43
RE: Modbus profile generator - by admin - 30.06.2022, 10:58
RE: Modbus profile generator - by mellotron - 03.10.2023, 12:16
RE: Modbus profile generator - by Daniel - 03.10.2023, 12:21
RE: Modbus profile generator - by mellotron - 03.10.2023, 12:34
RE: Modbus profile generator - by Daniel - 03.10.2023, 14:05

Forum Jump: