Forum Home › Forums › Communicating with Devices › Modbus › Set Value Modbus Slave
- This topic has 11 replies, 2 voices, and was last updated 6 years, 8 months ago by
Mikhail.
-
AuthorPosts
-
March 24, 2019 at 4:57 pm #5185
ronnie.nilsson
ParticipantHi, I have a Vacon 100 as a Modbus TCP Slave. It works fine to read values but when I try to send a command to write to the same it don´t work… I have tried to send the value with SetVal(1640, 20) (1640 is the Tag ID) in communicator but no luck. Do you have any suggestions what I do wrong?
March 25, 2019 at 6:09 am #5188
MikhailModeratorHi,
First of all, make sure that sending commands works well only in Communicator (open Commands tab). If it doesn’t work, see communication line log.
SetVal() doesn’t send command. You should use output channels for this.
March 25, 2019 at 7:33 am #5190ronnie.nilsson
ParticipantThanks for the answer Mikhail. Commands tab works well and it say´s commands are sent. To be honest I don´t know what command should be written and it´s very difficult to find this in the documentation? I have written a decimal and hexcode but no luck. Could you give me an example of a command that writes a value to a modbus TCP Slave in the Communicator command tab?
March 25, 2019 at 2:46 pm #5195
MikhailModeratorIt depends of your Modbus register map. You have to create commands in Modbus template. The default configuration contains example of Modbus commands.
Can you share what you did?March 25, 2019 at 3:28 pm #5199ronnie.nilsson
ParticipantI really appreciate your help, really got stuck on this issue…
It´s difficult to share pictures here but on … I put up some screenshoots. I have tried a lot of adresses but the latest I try to write to is FBProcessDataIn 2001 = 42001 I have another program looking at the value in the modbus slave but there is nothing…-
This reply was modified 6 years, 8 months ago by
Mikhail.
March 26, 2019 at 2:32 pm #5213
MikhailModeratorYou should upload images to any other hosting and copy links to this topic.
March 27, 2019 at 2:03 pm #5222ronnie.nilsson
Participant
March 27, 2019 at 3:35 pm #5226
MikhailModeratorSorry, the images have too small resolution. It’s impossible to read anything. Please don’t resize images when upload.
March 27, 2019 at 4:29 pm #5231ronnie.nilsson
Participant
-
This reply was modified 6 years, 8 months ago by
ronnie.nilsson.
March 27, 2019 at 5:15 pm #5233
MikhailModeratorSet Commands enabled checkbox in Communication line parameters.
You can find a message that describes it in communication line log.March 28, 2019 at 7:38 am #5238ronnie.nilsson
ParticipantThank´s Mikhail!!! Now it´s working!!! : )
March 28, 2019 at 2:39 pm #5243
MikhailModeratorNice )
-
This reply was modified 6 years, 8 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.