App Developer - Modbus Master

For general Flowcode discussion that does not belong in the other sections.
steve001
Valued Contributor
Posts: 185
http://meble-kuchenne.info.pl
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

App Developer - Modbus Master

Post by steve001 »

Afternoon,

Is it possible to view available COM ports, and apply setting external to flow chart as well as Device nodes

i.e by using "dialogue box entry"

you can set the chart to look at COM5 and device with address = 1 - but this could Easley change

Steve

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer - Modbus Master

Post by steve001 »

Part solved

Address Question Solved ...

Created a variable "Modbus_address" and used this in the slave ID field in the component macro

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer - Modbus Master

Post by steve001 »

Evening

Is it possible to be able to select the comport from the panel ?
A user may plug into a different port especially if they have a USB Convertor etc.

Steve

medelec35
Matrix Staff
Posts: 1491
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 536 times
Been thanked: 485 times

Re: App Developer - Modbus Master

Post by medelec35 »

Hi Steve,
Yes, looks like the default is to be able to select the com port by properties of the panel
Martin

BenR
Matrix Staff
Posts: 1786
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 455 times
Been thanked: 621 times

Re: App Developer - Modbus Master

Post by BenR »

Hello,

Any component properties you need the user to be able to set you can right click and Expose to top level. This adds the property to the top level panel properties which are visible to the user.

These exported properties can then be organised into folders and given more friendly names to help the user determine what each property does.

In your case I would expose the COM port property and also the Refresh property from the Modbus component.

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer - Modbus Master

Post by steve001 »

Cheers Guy's will have a go later

Steve

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer - Modbus Master

Post by steve001 »

Morning,

Having some problems if someone could please advise,

When i run the the green arrow is flashing on the dashboard, the red arrow doesn't flash
However i cannot see the Transmit LED flashing on my USB - RS485 Adaptor (shows as Com8 on my PC)

i have tested using winbus and i get a response from the meter.

Steve
Attachments
Capture.JPG
Capture.JPG (58.35 KiB) Viewed 4715 times
RI-F550 Test Modbus.fcsx
(12.25 KiB) Downloaded 173 times

BenR
Matrix Staff
Posts: 1786
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 455 times
Been thanked: 621 times

Re: App Developer - Modbus Master

Post by BenR »

Hello,

What USB to RS485 adapter are you using? I wonder if it requires flowcontrol to work correctly? Also check your other software doesn't still have the COM port open.

I use a dongle like this and it's working great.

https://www.amazon.co.uk/DSD-TECH-SH-U1 ... 079&sr=8-6

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer - Modbus Master

Post by steve001 »

Hi Ben,

i am using the same one, i have also tried a FTDI chip and my westamo convertor
not sure what my usb to RS232 convertor is, think its a brain boxes one as the marking have rubbed off now its an old one

https://uk.rs-online.com/web/p/serial-c ... /6877834/?

and

https://www.westermo.co.uk/products/con ... /mdw-45-lv

i only used winbus to check it worked after trying with the app

Steve

Edit: - do you have an example i can have a go with please ?

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer - Modbus Master

Post by steve001 »

hi Ben,

Is the slave replying ?, as the reply's in your you tube video's are blue with a green ok next to it.

Not getting much sense out of it at the moment

Steve
Attachments
Capture.JPG
Capture.JPG (76.83 KiB) Viewed 4619 times

Post Reply