|
I am not very good at programming so I am trying to reading of discreet inputs and riwting in the coil but always disply this msg: moddbus says errror ; illegal data adress!.
|
|
|
|
|
mate, unless you provide more info, for instance, the type of PLC/Modbus device you're reading from, and what settings you've tried, I doubt people can help you. On one particular device Ive used, for some bizarre reason, I have to offset the addresses by +1.
|
|
|
|
|
i have PLC rackwell iwant read and riwte by modbus ,the first one i can read the input discrte iputs and coil ,but i have problem for writing in coils single and multiple .
|
|
|
|
|
Greetings,
Having trouble connecting with both the sample app and my application. Connects fine to Mod_RSsim modbus simulator. Won't connect to a Delta-Tau brick controller.
Wireshark trace is here:
https://www.dropbox.com/sh/2kgv1t72evq7pk7/AAD8cZMDS2cD7COlEmeBYx0Wa?dl=0
It shows two connections, and then the second connection gets an RST (three times - TCP Suprious Retransmission)
My app just times out on the connect to the brick controller.
Looking for any ideas on what to check or try. Thanks all in advance.
|
|
|
|
|
Solved: In the case of the Delta Tau brick controller. When it is in server mode it will only allow one socket connection. The ModbusTCP library connects twice (sync and async). I commented out the sync connect code and the modbus app seems to happily connect to the brick controller now.
|
|
|
|
|
Hello.
tell me how to register values with a comma? registers in the slave values with a comma (eg 21,6) and when getting the value of artists get 21! Thank you
private void ShowAs(object sender, System.EventArgs e)
{
double[] iword = new double[reg_count];
string[] word = new string[reg_count];
if (data.Length < 2) return;
iword = new double[data.Length / 2];
word = new string[data.Length / 2];
for (int x = 0; x < data.Length; x = x + 2)
{
iword[x / 2] = data[x] * 256 + data[x + 1];
word[x / 2] = iword[x / 2].ToString();
}
for (int i = 0; i < word.Length; i++)
{
res[i] = word[i].ToString();
}
}
|
|
|
|
|
Hey, this is wonderful application. i used it in connection between Delta PLC and Ethernet. But i am facing a problem , After few time this lost it's Connection Automatically and error occurs "Connection Lost". And in my Application i need the connection continuously.Even 1 sec lost connection is also not allowed. so can u please let me know how to solve this problem?
|
|
|
|
|
I would need Wireshark traces to see why it is disconnecting. Also make sure that you don't poll datat too fast. Maybe the slave is not able to keep up with the requests.
Stephan
|
|
|
|
|
Hi megha_p,
I seem to be getting the same Connection lost Problem.
Did you get this solved and figure out the cause?
Thanks,
Rob
|
|
|
|
|
Very nice job, thanks a lot.
|
|
|
|
|
I want to poll specific register suppose only 40001.Using onresponse data it polls all the registers starting from start address to number to registers to poll.I want to poll only specific address mention in my Textbox.
|
|
|
|
|
Register 40001 means that this is a holding register with address 1 (or 0 Modbus on not quite clear on that). So what you have to do is read holding register from address 1 with length 1.
Stephan
|
|
|
|
|
Though the code is a bit too hard-coded for my taste, this application gets the job done. Thanks! You saved me so much time at work.
|
|
|
|
|
Nice job developing the Modbus library but, the downloaded file does not contain the .doc file suggested. "The class directory contains a help file (ModbusClassTCP\doc) with detailed information for every function." I do however find a .chm file but I get no data, just titles of the data I would like to view. Is there a way I could get the documentation on the library for Modbus? This would help speed development time. Thanks for your help.
AutomationBrent
|
|
|
|
|
If you dont see any content in the CHM file, do a right click on the file and select properties. Then click on the Unblock button in the top right corner. Now the content should show up fine.
Stephan
|
|
|
|
|
First this is an excellent project!
I am not very good at programming so I am trying to figure out how to modified this program where it does a continuous reading of discreet inputs without having to click the button. Just keep refreshing as changes in the module inputs occur.
Thanks
modified 18-Apr-15 11:29am.
|
|
|
|
|
Unfortunately, there is no event mode in modbus so you have to use a .NET timer object and poll the data continuously.
Stephan
|
|
|
|
|
Very nice program, thanks1
|
|
|
|
|
Thank you for all the work done and efforts put in writing this code and article.
I downloaded the source , compiled and run it. I am able to connect to the Modbus TCP gateway through which I am trying to communicate with a Modbus RTU device.
However , in the sample program given herewith , I am able to only connect to gateway , but no data sent-received. I am able to get data in ModScan32 tool, that means there is no issue in hardware setup. Please help.
Also, I tried to write a piece of code on my own using the MOdbusTCP class , there I am able to connect and send but unable to receive the data. Which function/method I need to call or is called to receive the data?
|
|
|
|
|
I can read coils but not registers seams the ID of the Response is not seeing the 3 valve letting the case statement breakout correctly. Any Ideal were to start?
|
|
|
|
|
it might be helpful if you post the piece of code you're talking about and the inputs you had, and possibly what slave device/type you were talking to
|
|
|
|
|
Seam to have been a usb Ethernet port causing the problem.
|
|
|
|
|
hello
i get below image error after a period of time.
http://upload.tehran98.com/upme/uploads/0bf200d188ee8a401.jpg
What should I do to solve this problem ؟
|
|
|
|
|
i'm too, who can help ...?
|
|
|
|
|
I'm working on my own project and this code helps me a lot. By the way why didn't you add float support on the project? Sometimes reading data on word is not enough, i'll try to add float, if i did, I will share with you. Thanks.
|
|
|
|