General Category > Tips & Tricks

Modbus Addressing

<< < (3/4) > >>

Godra:
I have slightly modified the program to include setting slave ID and showing the selected cell address.

Multiple instances of this program can be run and I have managed to run 1 AHMI application polling 2 slaves on the same computer by using 2 ModbusRTUCom drivers and with slaves having IDs of 1 & 2 (com0com was also used with 2 sets of paired ports).

The solutions have been updated and can be downloaded from the links previously posted.

For those using 64-bit Windows and with text size at Medium & Large (125% & 150%) the x64 version has also been updated and replaced.

Attached here is a standalone exe file of the new version.

Godra:
Doug,

I just noticed the same name as yours in the About box of the MOD RSSim v8.21 program (wouldn't be surprised if it is you).

DougLyons:
Godra,

Yes, I did contribute back to the Mod_RSsim program with some improvements and fixes to create ModRSsim2.
My contributions were only a very small part added onto the original great program which had the last version as Revision 8.20
I liked the features of this program very much, the but I found several small errors in the code.
The original developer seems to have moved on to other work areas and was not responding to BUG reports or emails.
Therefore I took it upon myself to try and fix the errors that I found and add features such as logging to disk.
The result was what is now on SourceForge as ModRSsim2 and I plan to make changes to it to make this program DPI aware.
This was the result of seeing that your program did not display correctly on my 125% magnified desktop.
My older eyes need a bit of help here and there is even another option to use 150% that should be accounted for.
I have been researching what is required to do this and I believe that I have the basis to proceed.
When I am finished I plan to make proposed suggestions to your program to account for these conditions as well.

Thanks for noticing.

Doug Lyons

Godra:
Doug,

Just discovered that the trick is in setting a blank form's AutoScaleMode property to Dpi and then placing all the controls on the form. When done this way the controls will inherit this behavior. It doesn't work if the property is initially set to Font and then, after controls were placed on the form, changed to Dpi (when done this way the controls seem to retain the initial Font setting).

I tried it on 64-bit Windows with 125% and 150% text settings and it works fine (give it a try).

All the files attached in this topic have been replaced and the solutions have been updated as well.

DougLyons:
Godra,

Great work. Thanks for sharing.
I will definitely check it out, but it may take me a bit because of other involvements.

Thanks again,

Doug Lyons

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version