All previous versions of this software are posted here on the sourceforge.net site. Therefore, you could see if the original version worked and test each successive version to see where it stops working. Even the original project here https://sourceforge.net/projects/modrssim/ had the ability to set socket timeouts.
If you look at the "F1" key "Help" menu, you will see a section on "Script Automation". If you download the full source code you can search for files with the extension VBS for other examples.
ModRSsim2 can't run due to missing mfc100.dll
I am closing this because there has been no response from the creator in a while.
Use the link on the main page here: https://sourceforge.net/projects/modrssim2/ It should be the following: http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x489 It is a requirement to have Visual Studio 2010 redistributable installed to be able to run this program. You may have have to copy the link and paste it into another browser tab that is blank to make it work.
Use the link on the main page here: https://sourceforge.net/projects/modrssim2/ It should be the following: http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x489 It is a requirement to have Visual Studio 2010 redistributable installed to be able to run this program. You have have to copy the link and paste it into another browser tab that is blank to make it work.
Use the link on the main page here: https://sourceforge.net/projects/modrssim2/ It should be the following: http://go.microsoft.com/fwlink/?LinkID=177916&clcid=0x489 It is a requirement to have Visual Studio 2010 redistributable installed to be able to run this program.
64bit registers support
Sorry, but I am not planning to add support for 64-bit registers since I am now retired. But, the source code is included, you or anyone else is welcome to add features. Thanks. Doug Lyons
Thank you for your request and idea for a "Feature Request". I am no longer using this regularly or doing development on it since I am now retired, but I will consider it for a future revision. I am closing this now, since it is no "Bug". Note that since I have provided the source code, anyone may add features including youself. If I am provided changes for this, I will review them and try and incorporate them into the next revision.
Assign slade ID via the command line
Forked this on Github
Thank you, Pavel for doing this. I see that you have added some interesting options there. I am closing this now because it is not a "Bug", but I have added a comment onto the "Wiki" page noting this.
Home
Endian formats
I am closing this "Bug" because it was more a "Question" that hopefully has been answered now. Please create another "Bug" report if there is anything remaining to be answered in your opinion. Thanks. Doug Lyons
There are some manufacturers of PLC's that say they support the Modbus protocol that use the swapped word arrangement for floats internally. There is no defined standard within the Modbus documents about how a 32-bit IEEE-754 floating point number is stored in a Modbus PLC. So there is no consistency among manufacturers, other than that most that deviate from what Modbus does, do word swaps. This is what the "Clone" represents. The "Clone" selection means that this handles the 32-bit floats like...
There are some manufacturers of PLC's that say they support the Modbus protocol that use the swapped word arrangement for floats internally. There is no defined standard within the Modbus documents about how a 32-bit IEEE-754 floating point number is stored in a Modbus PLC. So there is no consistency among manufacturers, other than that most that deviate from what Modbus does, do word swaps. This is what the "Clone" represents. The "Clone" selection means that this handles the 32-bit floats like...
Coil writes are not working well for some ranges
Reported as working now with new version 8.21.2.9, so closing
Please try the new version 8.21.2.9 that was just uploaded. Thanks.
Home
In the case that you show above, it may help if you choose the option for "Use Long Timeouts". This changes the numbers from 100ms/500msto 250ms/1000ms. The two numbers represent the maximum time between characters and the maximum time before a message times out. These numbers are only approximations. Thanks. Doug Lyons
There was a regression for Modbus Function Code 15 (Hex 0x0F) in the most recent revision of this project, so you may be able to use version 8.21.2.7 and have this work. I plan to create a fix and upload it to SourceForge within a week or so. Thanks. Doug Lyons
Mr. Duarte, Would you be willing to share your VBS code here so that it might benefit others? Thanks. Doug Lyons
Mr. Duarte, If you look at the 2nd row of selections near the top of the display, there is one that shows "Fmt:". You can use the pull-down selection and set this to "float 32". This will allow you some options. Because a 32-bit float takes two 16-bit registers, they can begin on either an even or odd address. Since the system does not know which is intended, the display attempts to show both values. So you have to decide whether to read/write to the even or odd address. I see that you reference...
Hello, Kali. The ModRSSim2 server takes its IP address from the computer that it is running on. Therefore, it is possible by doing something similar to the following. Install a Virtual Machine server such as Virtual Box or VMWare. Now install an operating system in two seperate instances. You can find a free version of ReactOS that is capable of running this at https://sourceforge.net/projects/reactos/files/ReactOS/0.4.15-ReleaseCandidates/. Set these two machines to have dedicated IP addresses that...
Hello, Kali. The ModRSSim2 server takes its IP address from the computer that it is running on. Therefore, it is possible by doing something similar to the following. Install a Virtual Machine server such as Virtual Box or VMWare. Now install an operating system in two seperate instances. You can find a free version of ReactOS that is capable of running this at https://sourceforge.net/projects/reactos/files/ReactOS/0.4.15-ReleaseCandidates/. Set these two machines to have dedicated IP addresses that...
Don, It seems to me you should be able to just look up this key's value in the machine manually: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\Bias. Then just take this value (300 for Eastern Time) and plug it into the script as shown below. dim d d = DateAdd("n", 300, Now()) SetRegisterValue 3, 1, DatePart("s", d) SetRegisterValue 3, 2, DatePart("n", d) SetRegisterValue 3, 3, DatePart("h", d) SetRegisterValue 3, 4, DatePart("w", d) SetRegisterValue 3, 5, DatePart("d", d)...
Don, Please see if you don't have "clock.vbs" in your sources download folder. It shows how you can use the "timer" variable that is part of Visual Basic Script to get the time. Since it is small I will include it here: dim x dim n dim hr dim min dim sec n = int(timer/100) x = timer - n*100 h = timer SetRegisterValue 3, 0, n SetRegisterValue 3, 1, x if ((int(x/10)*10 - x) >= -1) then SetRegisterValue 3, 2, x ' Or your code here end if hr = int(timer/60/60) min = int((timer - hr * 3600)/60) sec =...
Don, Please see if you don't have "clock.vbs" in your sources download folder. It shows how you can use the "timer" variable that is part of Visual Basic Script to get the time. Since it is small I will include it here: dim x dim n dim hr dim min dim sec n = int(timer/100) x = timer - n*100 h = timer SetRegisterValue 3, 0, n SetRegisterValue 3, 1, x if ((int(x/10)*10 - x) >= -1) then SetRegisterValue 3, 2, x ' Or your code here end if hr = int(timer/60/60) min = int((timer - hr * 3600)/60) sec =...
Balaji, Are you using "seperate set of registers for each station"? Please review https://sourceforge.net/p/modrssim2/tickets/22/ If this does not help, please provide the version that you using, a screen shot of the main screen, and a debug log for me to review. With this information, I will be better able to help you. Thanks. Doug Lyons
Home
where is the device address setting?
Closing now.
Patrick, Address 0 is not deactivated, but receives and processes requests. It just is prohibited from sending a response because of its slave status that address 0 is a broadcast address for all listening slaves. If more than one responded, this would be very confusing in general. Thanks. Doug Lyons
Malformed Modbus message for Function Code = x17
Closing this now.
Jonas, I have just uploaded a new version 8.21.2.8 what should have this functionality completely implemented for both Serial (your case) and Ethernet. Enjoy and Thanks for your interest and comments on this project. Doug Lyons
Socket Timeout
Closing this now.
Version 8.21.2.8 was just released and it changed the range for timeouts from 10-1000 to 1-1000. Thanks for your interest in this project. Sorry it took so long to get to this request. Doug Lyons
Jonas, As I mentioned above, Function Code 23 was not implemented on the Serial side. I plan to post an updated versions of this program within the next month that will implement it in version 8.21.2.8, so maybe you can watch for it. I have just recently found time to address this issue. Pavel, Your fix just removed the error message, but did not account for the needed response. Thanks for forking and working on this. Doug Lyons
Physical connection. Not a bug.
Moving to 'closed' now. Thanks.
Sarge, Thank you very much for your follow-up comment. I find it very informative and hopefully it will help out any others who might come here for this or a similar problem.
Yes. If you select the format (Fmt:) as "float 32" this will show the numbers as floating point values and you can enter them directly here. Because we cannot know whether the two consecutive words start on an even or odd address, all addresses are displayed as if they were the beginning value, so you will have to know to use and look at only the odd or even displayed values. This does not allow for any word or byte swaps, but only uses the standard IEEE-32 bit floating point format as used in the...
There are some manufacturers of PLC's that say they support the Modbus protocol that use the swapped word arrangement for floats internally. There is no defined standard within the Modbus documents about how a 32-bit IEEE-754 floating point number is stored in a Modbus PLC. So there is no consistency among manufacturers, other than that most that deviate from what Modbus does, do word swaps. This is what the "Clone" represents. The "Clone" selection means that this handles the 32-bit floats like...
I suggest that you try using the F1 key and looking at the HTML help file. To answer your question, on the "Registers" display near the top right there is a "Clone" checkbox that reverses the byte order for floats and doubles. Thanks.
This program responds to any Device ID from 1 through 255. Device ID zero (0) is a broadcast address and any requests to this address create no responses. This is the reason that there is no input needed for this parameter. The bottom of the display shows which device is asking for data and you can go to the "Comms" display to see the Device ID. I normally consider this a feature, rather than a bug. Thanks.
Sorry for the delay. I have had health problems lately and am moving slowly these days. From looking at what you attached, it looks like you may be testing using the "serial" protocol. If so, then I have not addressed this at all. I have been testing and using only the TCP/IP protocol. FC23 was the last Function Code that I added and did not address the "serial" side. I retired about 2 years ago and no longer use this much, so there is not much chance I will fix this. Thanks for reporting and if...
Multiple ID,
Closing now. This is actually a feature request and not a bug. Thanks.
Chris, I do not believe that there is any standard for an RJ45 Modbus connection. I have used many RJ45 connectors in the past and I have always had to refer to the equipment vendor's documentation and mostly use conversion from their standard to RS-232 standard 9-pin D-shell connectors. I have used RS-485 signal levels in the past as well, but only with full documentation from the vendor of the converters or devices. Good Luck! Doug Lyons
OK. I believe that I see what is happening here. We only have a maximum of 65536 registers that we can use. If you are assigning 13000 registers per station then we can calculate the maximum stations that you can use as the integer of 65536 / 13000 which is 5. So you can only have 5 stations and so you get the error on station #6. There is a wrap-around effect probably that allows you to use numbers higher than this, that probably should be trapped and reported as an error. On the next revision of...
You should use the 'F1' key when ModRSsim2 is the active window to see the help file and search for "Log" to answer your questions. I have attached a picture here that shows what it says. The file will be named "DEBUG.TXT" and will be in the same directory where ModRSsim2 resides. Thanks.
Also, please turn on logging and capture some example communications for me and attached it here. Thanks.
Please send me a screen capture of your "Advanced Emulation Settings" page. It can be viewed by clicking on the next-to-the-last button at the top right of the ModRSsim2 screen. I suspect that you may be using the "Use a separate set of registers for each station. Thanks.
One of the options is "Units are all off at startup", so if you check this option, you will have to manually say what you DO want. Maybe that is a help.
over-write register config seems to be very easy?
The registers are saved in the file MODDATA.DAT in the same directory as the program. So it may be a good idea to back up this file if it contains lots of changes. You can use a CSV import to set the registers and save this which gives you lots of options for revisions. I will consider adding a confirmation message box to the first two button options in my next program revision. There is a "Load register values on startup" option box when you use the fourth button as shown on the attached screen...
save 'station enabling'
Personally, I never change the stations enabled. But I appreciate your suggestion and I will consider including saving the stations enabled on my next revision.
Suggestion.
I will consider your suggestion for an improvement in my next revision. But for now, once you do double-click, it is very easy to tell where you are as you can see on the attached screen shot. Then you can "Cancel" if you have the wrong address.
Please review the "Help" text available by using the F1 key. Attached is an example of setting the stations to all off at startup for both serial and Ethernet options. Also, it shows how to set the registers to automatically load on startup.
'stations' handling could be better.
Regarding a seperate set of registers per station, this shows how to use the Advanced setting to select this and there is a good explanation in the Help available from the F1 key.
Please review the "Help" text available by using the F1 key. Attached is an example of setting the stations to all off at startup for both serial and Ethernet options.
Any change of an easy-to-install option?
I am glad that you found it. I have provided a compiled EXE that only needs the Visual Studio 2010 redistributable to be installed. Hopefully, you have figured this out now.
No serial config window
Closed, since the user answered the question.
It is short for "protocol" which indicates whether you want to use serial, ethernet, A-B, or Joy.
Support for entering 32bits IEEE754 values
There has been no response from the reporter for about 10 days, so I am closing this now.
64Bit os, need only 32bit Visual C++ Redistributable for Visual Studio 2010
Closing.
I will try and put a comment on the home page to reflect this soon. Thanks.
Jean-Philippe, All that you need to do is to go to the "Fmt:" field at the top center of the main screen and select "float 32". Now when you enter a number it will be converted to the IEEE754 format of 32-bit and placed in the register selected and its following register. This can be confusing when looking at the display because it is not possible to determine which is the beginning set of bits. Therefore, the display shows the converted "float 32" number at each beginning position and the value...
Malformed Modbus message
Milan, Thanks for the report and the solution. This might help others. Unfortunately, I have seen many USB converters that do not work well. My experience is that those made with the FTDI chipset are some of the best ones. Thanks again. Doug Lyons
Home
Marcus, I had done a search in VS2010 across the "Project" for the "_PROCESSOR_H_INLCUDED" and it was not found. After reading this email, I did this again and it was still not found, so I did a search in the directory and found the "processor.h" file. This is not a part of the actual project, but appears to be a left-over file from the original author. I have now removed it from the source code and on the next release this file with this error will no longer be included. Also, I did a search for...
Marcus, I had done a search in VS2010 across the "Project" for the _PROCESSOR_H_INLCUDED and it was not found. After reading this email, I did this again and it was still not found, so I did a search in the directory and found the "processor.h" file. This is not a part of the actual project, but appears to be a left-over file from the original author. I have now removed it from the source code and on the next release this file with this error will no longer be included. Also, I did a search for the...
Marcus, I had done a search in VS2010 across the "Project" for the "<ub>PROCESSOR_H_INCLUDED" and it was not found. After reading this email, I did this again and it was still not found, so I did a search in the directory and found the "processor.h" file. This is not a part of the actual project, but appears to be a left-over file from the original author. I have now removed it from the source code and on the next release this file with this error will no longer be included. Also, I did a search...
Exception Code 0x03 on long FC16 write request
Martin, I have posted a new version that fixes this problem, so I am closing this ticket. Thank you very much for reporting this problem so that I could fix it. Doug Lyons
Markus, I have made changes in accordance with your request, so I am closing this ticket now. Again, ThankYou for your reporting.
Home
Martin, Thanks for your report. I can confirm that there is a problem with writing more than 62 holding registers at once. There is an error in the PDU Size calculation. This size should be in 16-bit registers and it is handled as if it were bytes by mistake in the program. As a workaround until this is fixed you can go to the "Adv. PLC Emul. settings" button at the top right and change the "PDU Size" at the bottom of this pop-up from the default of 256 to 512. Thanks, Doug Lyons
Martin, Thanks for your report. I can confirm that there is a problem with writing more than 62 holding registers at once. I will look into the cause over the next few days and try to provide a fix. Thanks, Doug Lyons
Markus, This looks like a reasonable change to make, so with the next revision I plan to include your suggested changes. Thanks for reporting.
Write multiple coils overshoots by 1 bit for Modbus/TCP
Since there has been no response from the reporter in some time and a fix has been implemented, I am now closing this as fixed.
Home
lurkingkiki, please download and test the new version 8.21.2.6 and verify that this problem is fixed. I have not made use of your suggestion for calculating bits, but I may use it in the future. Thanks. Doug Lyons
lurkingkiki, please download and test the new version 8.21.2.6 and verify that this problem is fixed. I have not made use of your suggestions for calculating bits, but I may use it in the future. Thanks. Doug Lyons
[lurkingkiwi|https://sourceforge.net/u/lurkingkiwi], please download and test the new version 8.21.2.6 and verify that this problem is fixed. I have not made use of your suggestions for calculating bits, but I may use it in the future. Thanks. Doug Lyons