Programming an HMI for Siemens Step 7 in Microsoft.Net?

hold the output singal

Hi,
We have a simatic field PG which we use for the s7-300 PLC's,
I written my own logic according my process, I can get output “1”, but how I can hold the signal,

I try before set and reset for internal memory, the internal memory SET OUTPUT “1”can get, after few millisecond output change “0”,
So I need to hold the output “1” signal or unless my reset “1” only set output get “0”
How to do it,

Thankyou
saravanan

 
Finally had a chance to get into this a bit...



s7net looks the most straightforward to get started with.

there is no documentation, but some examples like

Code:
// create the plc-object
S7.PLC plc = new PLC(CPU_Type.S7300, "192.168.1.130", 0, 2); 
// open the plc S7300-type
ErrorCode errCode = plc.Open();      
// set bit 0 in marker-byte 20
plc.Write("M20.0", 1);            
 // read the word-value in DataBlock 100 Word-Position 40
UInt16 b1 = (UInt16)plc.Read("DB100.DBW40");          
 // close the plc
plc.Close();

In the first line the constructor of the PLC has the following arguments (CPU_Type cpu, string ip, short rack, short slot)

I am connected to a 315-2 DP via CP5511 (PG connection.) How would I determine the IP address?
 
jogibear9988 who wrote the wrapper for libnodave seems to be here occasionally.

libnodave is a bit of a head scratcher to begin with but here are a couple if 'ins'

In the libnodave folders go to the Dot.NET folder, in there you will find further folders for VB and CS, take your pick, CS has more examples. Both have simple Console applications for MPI connections. Once you get your first working connection the clouds start to lift.

To know what commands are available in the .Net wrapper go to the Dot.NET folder again and find the libnodave.net.cs file, this file is used to make the .NET wrapper for the main libnodave file. You will find all the commands listed here, the interesting ones start about half way down with daveReadBytes.

If you don't mind doing some testing for me you can download my version of Archies Advanced HMI, it has Siemens drivers that should give easy access to S7-300 over MPI.
http://www.plctalk.net/qanda/showthread.php?t=65022
It is only a very beta version which I will be updating as 'paid for' work allows.

One thing that you must get right with libnodave, always make sure that libnodave.dll is is the same working folder as libnodave.net.dll.
 
Well I tried to use these little utilities... even though the access point may be wrong I tried..

testS7online -s /S7ONLINE

in a windows command line and I get this output...

Code:
Unhandled Exception: System.IO.FileNotFoundException: File or assembly name libn
odave.net, or one of its dependencies, was not found.
File name: "libnodave.net"

=== Pre-bind state information ===
LOG: DisplayName = libnodave.net, Version=0.0.0.0, Culture=neutral, PublicKeyTok
en=null
 (Fully-specified)
LOG: Appbase = C:\Documents and Settings\William\Desktop\source dl wip\libnodave
\libnodave-0.8.4.6\libnodave-0.8.4.6\Dot.NET\CS\
LOG: Initial PrivatePath = NULL
Calling assembly : testS7online, Version=0.0.0.0, Culture=neutral, PublicKeyToke
n=null.
===

LOG: Application configuration file does not exist.
LOG: Policy not being applied to reference at this time (private, custom, partia
l, or location-based assembly bind).
LOG: Post-policy reference: libnodave.net, Version=0.0.0.0, Culture=neutral, Pub
licKeyToken=null
LOG: Attempting download of new URL file:///C:/Documents and Settings/William/De
sktop/source dl wip/libnodave/libnodave-0.8.4.6/libnodave-0.8.4.6/Dot.NET/CS/lib
nodave.net.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/William/De
sktop/source dl wip/libnodave/libnodave-0.8.4.6/libnodave-0.8.4.6/Dot.NET/CS/lib
nodave.net/libnodave.net.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/William/De
sktop/source dl wip/libnodave/libnodave-0.8.4.6/libnodave-0.8.4.6/Dot.NET/CS/lib
nodave.net.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/William/De
sktop/source dl wip/libnodave/libnodave-0.8.4.6/libnodave-0.8.4.6/Dot.NET/CS/lib
nodave.net/libnodave.net.EXE.

No .Net app config file basically. Very frustrating
 
Last edited:
Open the file in VisualBasic, in the Project Menu, Add Reference, browse and find libnodave.net. VisualBasic will put a copy of libnodave.net in to the bin/debug folder (I think, remember that I am no kind of VB expert). Find the reference to libnodave.net and manually copy libnodave.dll to the same folder. It might be worth also putting a copy of libnodave.dll in to the release folder. Edit the file so that it points to the correct MPI and Serial Ports and that speeds are set correct. You should find that things now work. Should point out that you should debug the program within VB or compile it in to an application.
 
Last edited:

Similar Topics

Hey Guys, To all the Siemens experts. I am tasked with programming a TP1200 HMI. I am new to TIA portal and Siemens HMI programming. Well, i need...
Replies
7
Views
4,473
Hey Guys, I am looking to bring some new guys onto my team and I was pondering the idea of doing a basic test just to weed out some peoeple that...
Replies
17
Views
2,808
I am trying to reduce the number of values behind the decimal point on the HMI. The values it is reading are "REAL" values from the PLC. I am...
Replies
3
Views
1,107
Good afternoon. I just recently did my first Panelview Plus 1000 programming using Factory Talk View Studio ME. With a little bit of trial and a...
Replies
6
Views
2,987
Hi guys, Please I need a rough estimate or idea rather (in USD) For a PLC Programming and HMI screen design/configuration contract Project of 50...
Replies
36
Views
10,956
Back
Top Bottom