Register on Extended Data, limit on Modbus RTU Master

Topics about the Software of Revolution Pi
ChrisDeveloper
Posts: 27
Joined: 03 Mar 2020, 00:58

Register on Extended Data, limit on Modbus RTU Master

Post by ChrisDeveloper »

Hi There,

What is the limit on the "Extended Data" for a "Modbus RTU Master with 150 Input" in PiCtory? I've read here: https://revolution.kunbus.com/tutorials/modbus/ that:

"A maximum of 32 registers per virtual device can be used for input and output data. Should you need more, then you can simply configure several virtual Modbus devices. A total of 30 virtual devices can be configured."

However in a previous forum post it was claimed to be 150, and also more than 1 master RTU could be used but could cause collisions.

viewtopic.php?t=1298

I've created a "Modbus RTU Master with 150 Input" and it limits me to 32 (See attached)

I've tried creating another Master RTU 150 but now it gives me a register limit of 64! See attached photo.

Is it possible to create a single virtual "ModbusRTU Master 150" with 150 registers in the Extended Data ?

Thank you very much.

Chris
Attachments
Screen Shot 2020-05-26 at 3.40.46 pm.png
Screen Shot 2020-05-26 at 3.40.46 pm.png (158.49 KiB) Viewed 14236 times
Screen Shot 2020-05-26 at 2.57.22 pm.png
Screen Shot 2020-05-26 at 2.57.22 pm.png (287.26 KiB) Viewed 14236 times
Frank
Posts: 65
Joined: 09 Jan 2017, 10:46

Re: Register on Extended Data, limit on Modbus RTU Master

Post by Frank »

Hello Chris,

the number of Action-Rows you can add in the 'Extended Data' of a Modbus-Master is currently limited to the number of 'Modbus_Action_Status' values you have in your configuration. For one master this is 32, for two masters, 64 etc.
In the next release of -PiCtory- there is an option to disable this limitation; I will attach two files to this mail to give you this option already in advance. Please replace the following files of your RevPi with these ne versions:

/var/www/pictory/resources/data/extensions/ext_modbus.html
/var/www/pictory/resources/data/extensions/ext_modbus.js

IMPORTANT: to copy this modified versions you need to write-enable the '/var/www/pictory/resources/data/extensions' directory with the LINUX 'chmod' command

These modified files should give you two new checkboxes on top of the 'Extended Data' dialog box:
- disable action rows limitation
- disable -Device Value- conflict checking

Checking the first one enables you to add as much action rows as you like; if you add a large number of action rows it makes sense to also check the second option, since having a lot of action rows significantly slows down the adding of new rows for the conflict checking that is performed for each new row. This conflict checking normaly prevents the re-use of already used 'Device values' (last column). If you switch it off it is in your own responsibility to avoid using the same 'Device value' multiple times.

Please give me a short reply whether this solution works for you ...

Regards
Frank

ext_modbus_new_options.zip
(8.64 KiB) Downloaded 969 times
ChrisDeveloper
Posts: 27
Joined: 03 Mar 2020, 00:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by ChrisDeveloper »

Hi Frank,

Thanks for the files, they allowed me to add extra rows to the Extended Data table (I needed to clear the browser cached files first).

However none of the Registers that where added beyond number 32 worked.

I am able to read/write to that register by name, but the command does not make it to the modbus device.

In the attached photo, I've moved this register which was normally at row 9 to row 33. In this configuration setting piTest -w ACC_O,1 no longer issues the modbus command to the hardware.

I've tried restarting the Revpi , tried with different coils, addresses etc.

Many thanks for your help.

Chris
Attachments
Screen Shot 2020-05-27 at 12.06.58 pm.png
Screen Shot 2020-05-27 at 12.06.58 pm.png (117.28 KiB) Viewed 14203 times
ChrisDeveloper
Posts: 27
Joined: 03 Mar 2020, 00:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by ChrisDeveloper »

Hi Frank,

Are there any further insights you can provide on this?

My company's application really needs a modbus master that can have more than 32 I/Os.

When is the next version of PicTory being released?

Thank you for your help,
Chris
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by Amar »

Hi Chris,
I tested out more than 32 I/Os at my side and it worked.I suspect you might have forgotten to apply reset driver after making the changes.
I am attaching a piCtory config file "configMaxRows.rsc" tested at my side.I used ModSim as slave emulator.
image-20200529-085943.png
image-20200529-085943.png (38.99 KiB) Viewed 14125 times
image-20200529-090018.png
image-20200529-090018.png (17.58 KiB) Viewed 14125 times
image-20200529-090155.png
image-20200529-090155.png (90.29 KiB) Viewed 14125 times
Please verify the same and your feedback will be valuable to us!

Attachment:
configMaxRows.zip
(9.12 KiB) Downloaded 844 times
KUNBUS
ChrisDeveloper
Posts: 27
Joined: 03 Mar 2020, 00:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by ChrisDeveloper »

Hi Frank,

Thanks for your reply.

I have tested this throughly and my process involved saving my project config, then resetting driver everytime I made a change. Nothing seems to work beyond row 32. To eliminate hardware, I swapped rows 32/33 with 36/37 (you can see from attached picture these are the same registers just different slave addresses). Sure enough, anything past row 32 didn't read from the registers.

I tried clearing my browser cache (Im using Chrome BTW), closed and reopen the browser tab just to make sure and also tried rebooting the revpi multiple times. I just can't seem to get anything working beyond row 32.

Perhaps I didn't make the correct permissions for the files/directory? I assumed I did because your changes made it into the Pictory application(after I cleared the browser cache first). I attached screenshots of files and extension directory just incase I've made a mistake.

Many thanks for your help.

Chris
Attachments
Screen Shot 2020-06-04 at 1.09.26 pm.png
Screen Shot 2020-06-04 at 1.09.26 pm.png (37.8 KiB) Viewed 14047 times
Screen Shot 2020-06-04 at 1.06.37 pm.png
Screen Shot 2020-06-04 at 1.06.37 pm.png (28.75 KiB) Viewed 14047 times
pic_kunbus_forum.png
pic_kunbus_forum.png (108.2 KiB) Viewed 14047 times
Frank
Posts: 65
Joined: 09 Jan 2017, 10:46

Re: Register on Extended Data, limit on Modbus RTU Master

Post by Frank »

Hello Chris,

can you please send us your var/www/pictory/projects/_config.json file?
to: support@kunbus.com, subject: 'Modbus33Config'

Regards,
Frank
ChrisDeveloper
Posts: 27
Joined: 03 Mar 2020, 00:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by ChrisDeveloper »

Hi Frank,

Did you have any luck regarding the config files I emailed through?

The reference id is `SUP-1502 Modbus33Config`

Kind regards,
Chris
User avatar
Amar
KUNBUS
Posts: 160
Joined: 15 Jul 2019, 12:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by Amar »

Hi Chris,
Your config rsc has overlapping of variables used in device value column. For eg: Action ID 32 for Slave 14 and Action ID 36
both write to same device value variable "ACC_int_fan_S" in process image. The device variable used should be unique for each action .
The feature is disabled by checking disable-Device Value- conflict checkbox since it takes long time when you have many action ids as in your use case and therefore needs to be manually verified.

I successfully tested your config by using unique variable Input_Bit_1 and Input_Bit_2 for action id 36 and 37 as shown in image below.
2020-06-15 11_12_38-PiCtory - 1.4.2.png
2020-06-15 11_12_38-PiCtory - 1.4.2.png (66.34 KiB) Viewed 13748 times
KUNBUS
ChrisDeveloper
Posts: 27
Joined: 03 Mar 2020, 00:58

Re: Register on Extended Data, limit on Modbus RTU Master

Post by ChrisDeveloper »

Hi Abar,

That doesn't make sense. I never clicked on the `disable -Device Value- conflict checking ` checkbox when adding the extra rows .

Also, the config file I sent through doesn't have any duplicate names.

See attached photo.

Is there any other fields that should have been updated in this _config file?


Kind regards,
Chris

Kind regards,
Chris
Attachments
Screen Shot 2020-06-16 at 4.10.24 pm.png
Screen Shot 2020-06-16 at 4.10.24 pm.png (66.47 KiB) Viewed 13719 times
Post Reply