Hello, In the picture you can see a connection and signal exchange with a CPU 416F-3. I can also establish a connection with a CP443-1. Is it possible that signal exchange of inputs and outputs via a CP443-1 with the Sharp7 library does not work? If it should work, what should the programming for signal exchange via the CP443-1 look like? Have any of you ever programmed a connection via a CP443-1? I hope that one of you can help me. Thanks in advance.
Hello, With this method can i set the Bit DB100.dbx54.7 to false. It's working. private void SetBit() { int S7AreaDB = 0x84; int dbnumber = uivalues.DBNr; int ValueByte = uivalues.ValueByte; int ValueBit = uivalues.ValueBit; int dboffset = (ValueByte * 8) + ValueBit; int S7WLBit = 0x01; byte[] buffersize = new byte[1]; s7Client.WriteArea(S7AreaDB, dbnumber, dboffset, 1, S7WLBit, buffersize); } What do I have to change in the method so that the bit can set to true? My idea is to set a bit when there...
Hello Davide, Thank you for your anwser. It's working. private void Button1_Click(object sender, EventArgs e) { int S7AreaDB = 0x84; int dbnumber = short.Parse(txtDBNr.Text); int TrigMoveFilesByte = short.Parse(txtTrigMoveFilesByte.Text); int TrigMoveFilesBit = short.Parse(txtTrigMoveFilesBit.Text); int dboffset = (TrigMoveFilesByte * 8) + TrigMoveFilesBit; int S7WLBit = 0x01; byte[] buffersize = new byte[1]; int Result = s7Client.WriteArea(S7AreaDB, dbnumber, dboffset, 1, S7WLBit, buffersize); ShowResult(Result);...
Hello, I'm use the example from the LoopDemo for my PRojekt. It's working good to read something from the DB. For the test i use a button to set the bit I have the problem when I set a bit in the DB, then all values in the DB are deleted. I don't get an error. The program does not crash either. private void Button1_Click(object sender, EventArgs e) { int dbnumber = short.Parse(txtDBNr.Text); int dboffset = short.Parse(txtDBOffsetNr.Text); int dbsize = short.Parse(txtDBSizeNr.Text); byte[] dbbuffersize...
Hello, Ok, I found the solution in the LoopDemo and in the Sharp7 Reference. It works very well. In the Sharp7 Reference find some more Code and i have this in the Form 1: public struct ComponentResult { public string PraegeCodeIB; public string FolderName; } private ComponentResult LeakResult() { ComponentResult result = new ComponentResult(); // Reads the buffer. int dbNumber = short.Parse(TxtDBNr.Text); int offset = short.Parse(TxtDBOffset.Text); int Size = short.Parse(TxtDBSize.Text); byte[]...
Hey, I'm new here. I'm still a beginner in C #. With the Post from the Internet make this to connect with a S7-400. That already works. I would like to read out a string with a trigger signal from the PLC e.g. M100.0. The string is 12 characters long, and it's just numbers. The string is in DB1200 and the first number starts at DBB2. namespace Test { public partial class Form1 : Form { private S7Client Client; public Form1() { InitializeComponent(); Client = new S7Client(); } private void ConnectBtn_Click(object...