Forum Home › Forums › Communicating with Devices › Modbus › modbus transfer string value
- This topic has 29 replies, 5 voices, and was last updated 10 months ago by Mikhail.
-
AuthorPosts
-
April 4, 2023 at 8:14 pm #12364asherbParticipant
hello,
i have a question about the modbus, we have a string value, we want to have it in rapid scada. i tried addressing the value, but it shows up as a number in rapid scada. i am wondering how could transfer string value from plc to rapid scada via mdobus.
thanks!
April 5, 2023 at 7:08 am #12365manjey73ParticipantAs far as I understand, you need to combine several registers into an array and specify a channel with the required data length. And in the Format to indicate that this channel is UNICODE or ASCII.
I haven’t tried it myself yet, but it seems like this is how you need to work with stringsApril 5, 2023 at 11:52 am #12368MikhailModeratorHello,
What is the max. length of the string?April 5, 2023 at 5:19 pm #12370asherbParticipanthello Mikhail,
the max length of the string is around 30.
April 6, 2023 at 8:51 am #12378MikhailModeratorTry getting a string as 4 registers of double type (8 bytes). They should be bound to 4 channels of the String data type. Let’s see the result.
April 6, 2023 at 5:59 pm #12390asherbParticipanthello Mikhail,
I bounded to 4 register of double type (8bytes) in rapid scada, and i tried both unicode and ascii as data type, however, it shows me as a very large number in the modbus current data list, and in the web browser, the string variable only show me ‘—‘,
please let me know what i can do for this.
thanks
April 7, 2023 at 12:57 pm #12391MikhailModeratorHello,
Change the channel data type to blank (double) to get large numbers.
Then add a new channel of the Calculated type, string data type and an input formulaData(101)
, where 101 is the source channel number.
Send screenshots of the settings and results.April 8, 2023 at 10:03 pm #12394asherbParticipanthello Mikhail,
thank you for your help, i tried, my configuration:
https://sm.ms/image/vr5EZHQi6jToBPKhowever, it shows like random things, btw, the string i have is in english, it shows like this:
https://sm.ms/image/2I8oLSBmE4lsXpaplease let me knwo how i can fix this.
thanks
April 10, 2023 at 8:45 am #12395MikhailModeratorHello,
Could you try the following:
1. In Modbus template change element’s data type to ulong (8 bytes)
2. Update channel data type to Integer, and set channel format to Hexadecimal
This can help to check the actual channel values.April 10, 2023 at 4:09 pm #12396asherbParticipanthello Mikhail,
i tried you mentioned above, however, i got a message in channel like this: https://sm.ms/image/wezHWgTs2JIN6VD
the calculated string channel shows: https://sm.ms/image/3UzKmxgHNMuToyd
the integer channel shows: https://sm.ms/image/Sy537m6tuTq4bsG
it is supposed to show this: https://sm.ms/image/JufC6ojrKMLgviE
please help, thanks
April 11, 2023 at 10:02 am #12402MikhailModeratorHello,
Could you make screenshots of the channels, Modbus template, and device data (in Communicator)?
April 11, 2023 at 6:53 pm #12408asherbParticipanthello Mikhail:
modbus template and communicator: https://sm.ms/image/KCxcXisOD6Qt3p1
channel configuration: https://sm.ms/image/4bRprKFHcBWISTv
what it show right now : https://sm.ms/image/Zp6YKS83aR7CebH
how it shows in plc : https://sm.ms/image/bRiBrfy3tg6GTXM
please help
thanks
April 12, 2023 at 9:38 am #12410MikhailModeratorHello,
I managed to make it work:
https://ibb.co/82BgRvJ
https://ibb.co/7nHQ7Hn
https://ibb.co/sb4vvyk
https://ibb.co/m4MdhqY
https://ibb.co/GTG0P8ZApril 12, 2023 at 9:39 am #12411MikhailModeratorByte order in the Modbus template is 76543210
April 12, 2023 at 9:40 am #12412MikhailModeratorCurrently it does not work with ulong data type. We should add this option in the future.
-
AuthorPosts
- You must be logged in to reply to this topic.