Giter Club home page Giter Club logo

dotnetsiemensplctoolboxlibrary's People

Contributors

7evenk avatar bzurkow avatar dependabot[bot] avatar englbit avatar fleibede avatar impoetk avatar jogibear9988 avatar metathron avatar nick135 avatar proemmer avatar ryan2445 avatar sevenmag avatar stefanhasensperling avatar thomasb454 avatar treschautomation avatar wadeso avatar yazgoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnetsiemensplctoolboxlibrary's Issues

Issue by loading projects with s7 programs without a PLC

I have found that an exception is thrown when opening projects with offline foldes that have no CPU as parent.

im not sure why, but the exception is thrown in the linq expression in the Step7ProjectV5.cs LoadProject Method

         foreach(var dp in DPlist)
        {
            var dpf = DPFolders.FirstOrDefault(x =>  x.IdTobjId.Any(y => y == dp.TobjID));
            if ( dpf != null)
            {
                if (dpf.TobjId == null) dpf.TobjId = new List<int>();
                dpf.TobjId.Add(dp.addr);
            }
        }

to fix it i have modified the linq to the following

            var dpf = DPFolders.FirstOrDefault(x => x.IdTobjId != null && x.IdTobjId.Any(y => y == dp.TobjID));

getting source code for DB with string

using GetSource prints wrong data when the DB has a string,

it brings the String Variable but it doesn't specify the amount of characters for such string variable.

tia portal file size changes

In the directory i see this file with 571 kb, in a vm with win7 x64 fresh installation, i also see 571 kb as size

DotNetSiemensPLCToolBoxLibrary/externalDlls/siemens/V15/Siemens.Engineering.dll

but in recent installations for V15 (win 7 and win 10 both x64) i've seen files of size 586 kb, and for this files i have an exception (type initialization exception) for type Siemens.Engineering.TiaPortal

both have file versions equal (from the properties of the file) all installations have the same product versions under details of installed software (tia portal dialog)

Should the dll be updated with the one of 586 kb???

How to read ap13 project file

Hi,
As I run TestLibrary project and try to read *.ap13 file will cause an error in LoadViaOpennessDlls();
Does this library support TIA ap13 file?

Source code for indexed db access

Indexed DB acces in a FC/FB/OB are not shown, instead the absolute access is displayed

Obtained source
U L 5.0;
U "M_AE362_BaQuittieren";
AUF "DB_TAKT";
= DBX10.5;

Desired obtained source:
U L 5.0;
U "M_AE362_BaQuittieren";
= "DB_TAKT".Takt[1].Cmd.Bits.Quit;

Failed to parse S7P file

I am trying to open a S7P file which worked fine on a older version (like 2 years old or something) but on the recent versions it keeps crashing.
The rows it keeps on crashing looks like this:

-       rows    {string[12]}    string[]
        [0] "\r"    string
        [1] "VAR_TEMP\r"    string
        [2] "  OB86_EV_CLASS : BYTE ;\t//16#38/39 Event class 3\r"  string
        [3] "  OB86_FLT_ID : BYTE ;\t//16#C1/C4/C5, Fault identifcation code\r" string
        [4] "  OB86_PRIORITY : BYTE ;\t//Priority of OB Execution\r"    string
        [5] "  OB86_OB_NUMBR : BYTE ;\t//86 (Organization block 86, OB86)\r"    string
        [6] "  OB86_RESERVED_1 : BYTE ;\t//Reserved for system\r"   string
        [7] "  OB86_RESERVED_2 : BYTE ;\t//Reserved for system\r"   string
        [8] "  OB86_MDL_ADDR : WORD ;\t//Base address of IM module in rack with fault\r"    string
        [9] "  OB86_RACKS_FLTD : ARRAY  [0 .. 31 ] OF BOOL ;\t//Racks in fault\r"   string
        [10]    "  OB86_DATE_TIME : DATE_AND_TIME ;\t//Date and time OB86 started\r"    string
        [11]    "END_VAR\r" string

As you can see line 9 is a array with some comment behind it saying
"//Racks in fault"

In the Parameter.cs file (PLCs\S7_xxx\MC7\Parameter.cs) it appends line 10 to line 9 resulting in the following line:
OB86_RACKS_FLTD : ARRAY [0 .. 31 ] OF BOOL ;\t OB86_DATE_TIME : DATE_AND_TIME ;\t//Date and time OB86 started//Racks in fault

This results in the following tmpType on line 311
ARRAY [0 .. 31 ] OF BOOL OB86_DATE_TIME : DATE_AND_TIME

Since there isn't a S7DataRowType like this it eventually fails to parse this row and crashes the application.

MEF - SharpZipLib dependency

when creating a dll with a dependency to DotNetSiemensPLCToolBoxLibrary and using the
Managed Extensibility Framework (MEF) to lazy load it into an application i get an error that there are dependecies to a SharpZipLib dll (ICSharpCode.SharpZipLib.dll) which is not in there.

Maybe it is missing in the nuget package or an obsolete reference

Getting the source for a any pointer accessing more than 32767 bytes

If the any pointer has acces to more than the limit of a signed int16 the source code generates a negative value

  CALL  "FC_BEREICH_LES_SCHREIBEN";
        ILesen     :=L 5.2
        ISchreiben :=L 5.3
        ISollWert  :=0
        IIndex     :=DB3810.DBW1068
        IDatenSchr :=P#M 20.1 BYTE 1
        IDatenLe   :=P#DB3560.DBX 14.0 BYTE 1
        IDatensatz :=P#DB3560.DBX 0.0 BYTE 126
        IDatenArray:=P#DB3560.DBX 0.0 BYTE -15136
        OIstWert   :=LW2
_012: NOP   0;

Seperate Library from Windows.Forms

I think we should separate the library into two (or more) libraries. One with the library itself, one with all Windows Forms related stuff and maybe one for WPF as well. This way we could eliminate the dependency to Windows.Forms assembly in the main communications library.

Of course this is an breaking change and a lot of stuff need to be reworked to make this possible.
What do you think?

Read alarms

Is it possible to read S7 alarms with the help of this library ? If yes, where can be found any samples for it ?

Bug in PLCConnection.cs

When I read, for example, 110 bytes from DB

for (int ii = 0; ii < 55; ii++)
listTag.Add(new PLCTag() { DataBlockNumber = 888, ByteAddress = ii * 2,TagDataType = TagDataType.Word});
myConn.ReadValues(listTag);

but DB888 have only 100 bytes, all tags in listTag have value "Item does not exist on the PLC" and not throw error.
If I read 1000 bytes from DB which have 900 bytes, 2 buffers 444 (444 = maxPDU - header) bytes len write to PLCTag's, but rest bytes not write to tag's and not have value "Item does not exist on the PLC" (because fall on a non-existent place in DB).

Can you do throw or message "Item not exist"?

PLCConnection.WriteValues several times

Hallo,

ich habe ein Problem mit der Funktion WriteValues, wenn ich diese sehr kurz hintereinander mit dem gleichen Bit verwende. Dies benötige ich für das Fahren einer Achse im Tippbetrieb, d.h. solange eine Taste gedrückt ist ist das Bit gesetzt, wenn nicht mehr gedrückt wird das Bit zurückgesetzt. Wenn ich dass schnell hintereinander mache, dann friert mit die gesamte Anwendung ein. Die Anwendung steht dann am lock und wartet unendlich lange. Entferne ich testweise den lock, dann geht es. Hier habe ich natürlich dann andere Probleme. Was ich noch erwähnen möchte. Im Hintergrund werden Variablen im 1000ms Takt gelesen.
Wie kann ich das Problem umgehen?

Vielen Dank im Voraus

Wolfgang Baldauf

Start / Stop CPU

Hello - would it be possible to start & stop a S7-300 using this library?

Block TIMESTAMPs not Correct

Hi ,

in the File LibNoDaveConnectionLibrary\DataTypes\Projectfolders\Step7V5\BlocksOfflineFolder.cs there are some Bugs in the GetBlockBytes Method.

  1. Based on my tests, in the rows with the follwoing subblktypes are the correct typestamps per blocktype:
    12 - FC
    8 - OB
    14 - FB
    13 - SFC
    15 - SFB
    10 - DB
  2. The calculation of the timestamp is sometimes not correct because of the Encoding:
    My suggestion would be, to Change this:
var ts1 = (string)row["TIMESTAMP1"];
Helper.GetDT((byte)ts1[0], (byte)ts1[1], (byte)ts1[2], (byte)ts1[3], (byte)ts1[4], (byte)0);

to that:

//use Windows-1252 code page to get correct time 
//because dBaseConverter uses this codepage for strings
var bytes = Encoding.GetEncoding("Windows-1252").GetBytes((string)row["TIMESTAMP1"]);  
Helper.GetDt((byte) bytes[0], (byte) bytes[1], (byte) bytes[2], (byte) bytes[3], (byte) bytes[4], (byte) bytes[5]);

Best regards,
Benji

EXCEL and Libnodave

Hey,

I am looking for libnodave library document which is using in EXCEL.
Thanks in advance.

Moelsayed

ProjectFolder date

I noticed that the S7Block has a LastCodeChange and a LastInterfaceChange, Is there also a similar way to notice if a ProjectFolder has changed?

I would like to see if the contents of a ProjectFolder have changed for example the addressing of a DataBlockRow inside a ProjectFolder. This way I can would be able to loop through all the DataBlocks and see which changed.

Currently I loop through all the DataBlocks to see if one changed but it would be neat if there would be some kind of date in the ProjectFolder itself.

Thanks a ton!

CPU Status Problem

Hallo,

ich bekomme manchmal die Meldung das die CPU in Stop ist, obwohl sie es gar nicht ist. Hast Du das auch schon einmal gehabt?
Mein Programm ließt Variablen aus einem DB mit Hilfe der PLCTag-List Funktion.
Gleichzeitig habe ich aber auch ein LiveBit welches alle 1000ms Sekunden gelesen wird. Kann es davon kommen, das sich diese Lese Anforderungen überschneiden?
Sonst läuft alles ohne Probleme.
mfg
Kalle

Symbolic-absolute source for ob, fc, fb, etc...

The following code doesn't give any option to use symbolic or absolute addressing

     public string GetSourceBlock(ProjectBlockInfo blkInfo)

the option useSymbol is always false

                    if (functionBlockRow.ToString(false, false) == "")
                        retVal.Append(Environment.NewLine);
                    else
                    {
                        retVal.Append(functionBlockRow.ToString(false, true) + Environment.NewLine);
                    }

is also a performance hit because it calculates two times the awl code,

it can be changed to something like:

   public string GetSourceBlock(ProjectBlockInfo blkInfo,bool useSymbol = false)

            (...)
                     string awlCode = functionBlockRow.ToString (useSymbol , true)
                     if (awlCode == "")
                        retVal.Append(Environment.NewLine);
                    else
                    {
                        retVal.Append(awlCode + Environment.NewLine);
                    }

PLCconnection.cs out of bounds error

call from " var blks = ConnItem.myConn.PLCListBlocks(PLCBlockType.AllBlocks);"
...

                {
                    int ret = _dc.ListBlocksOfType(Helper.GetPLCBlockTypeForBlockList(myBlk), blocks); //here I get 6116 i.e.
                    if (ret < 0 && ret != -53763 && ret != -53774 && ret != -255)
                        throw new Exception("Error: " + libnodave.daveStrerror(ret));
                    if (ret > 0)
                        for (int n = 0; n < ret*4; n += 4) // i=0 to 61168*4 
                        {
                            int nr = blocks[n] + blocks[n + 1]*256; //but blocks is only 8192!
                            myRet.Add(myBlk.ToString() + nr.ToString());
                        }
                }
                return myRet;
            }
            return null;
        }
    }

image 1

What do the S7ConvertingOptions do exactly?

Hi,

I'm looking for some guidance in using the toolbox. I use it to convert S7 project data directly to SCADA-objects.

I am trying to find the Called FB of an UDT-instance and I think using the S7ConvertingOptions might help me filter the addresses. (I have an UDT80 in DB18, 20.0 and I want to know that it is used in FC201)

Could you elaborate what the S7ConvertingOptions do? Or do you know another way of finding the FC?

Strange Block Upload behavior on S7-400

Recently y did some tests with the "PLCGetBlockInMC7" on S7-400 PLCs. The issue that i will describe here is, i think, not an bug in this library (or libnodave), but rather an bug in either the S7-Firmware or something similar. Maybe somebody knows something about this issue, or it will help somebody encountering the same issue.

The solution was easy: I retry the upload once. This solved the issue for me

First off some information about the software involved:

  • DotNetSiemensToolboxLib: 2.0.127 from 12.09.2016
  • S7: 416-2 DP 6ES7 416-3XL00-AB0
  • S7-400 Firmware: 3.1
  • S7-400: Hardware: I think it was 8, but i might be wrong here
  • CP: 6GK7 443-1EX11-0EX0 V1.1
  • Connected via ISO_over_TCP

All blocks that i was testing, where all definitely existing in the CPU.

Now to the issue i encountered.
When you connect to the PLC always the first block that you try to upload via PLCGetBlockInMC7 will fail with 0x8702 "address invalid". It does not matter what block you choose, always the first one will fail immediately (no timeout or something). When you try the second block, even if it is the same, it works without any problem.

I tested this, and could reproduce this behavior consistently. Always the first attempt to upload an block will fail, and the second one will succeed. The strange thing is, that it fails witch 0x8702 Address invalid, as if you are requesting some non supported block or something.

I traced the error and found that the library (and Libnodave) are behaving correctly as far as i can tell, and that in fact the PLC responds with this error. I also checked the Wireshark capture and also the Libnodave debug output, and could not find an error.

Log files
I captured this conversation with wireshark. It shows only the Upload packets, no connection packes:
Failure Upload pcap.zip

I also set the Debug output of libnodave to its maximum and activated an console to see if there is an error. I added some comments into the console output:
Failure Upload.txt

Error in adress

I'm have instance DB
Step 7 shows one address, and when read with DotNetSiemensPLCToolBoxLibrary - other
11
12

NullReferenceException in GetNetworksList

Hi,

in GetNetworksList is variable nw not initialized correctly:

In my opinion correct code should be:

nw = new S7FunctionBlockNetwork();
if (s7FunctionBlockRow.Command == "NETWORK")
{
nw.Parent = blk;
nw.AWLCode = new List();
retVal.Add(nw);
nw.Name = s7FunctionBlockRow.NetworkName;
nw.Comment = s7FunctionBlockRow.Comment;
}
else
{
nw.AWLCode.Add(s7FunctionBlockRow);
}

Todo's for Source creation...

fixed:

  • Real-Werte in Datenbausteinen schauen so aus: "X : REAL := 0;" sollten aber so ausschauen "X : REAL := 0.000000e+000;" um sie übersetzen zu können
  • In FCs (wahrscheinlich auch FBs) werden Sprungmarken nicht dargestellt, wenn sie in einer Zeile mit Code sind (z.B. M001: L DB3.DBD0)
  • Funktionsblöcke müssen auf END_FUNCTION_BLOCK und nicht END_FUNCTION enden
  • Umlaute und Sonderzeichen (in meinem Fall ä, ö, ü, °, ³) in den Kommentaren werden alle als ? dargestellt
  • Mehrere oder alle Quellen auf einmal erzeugen ware super
  • Wenn es keine temporären Variablen gibt, darf es auch die VAR_TEMP - END_VAR nicht geben
  • UDT Quellen werden falsch erzeugt (mit DB-Header und Initialisierungswerten)
  • Temporäre Variablen haben keinen Anfangswert
  • Konstante Realwerte bei FC-Aufrufparametern wurden als DINT interpretiert, und nicht als REAL
  • Realwerte mit Kommastellen bei Datenbausteinen: Das Komma ist ein Beistrich anstelle eines Punktes
  • Funktionsaufrufe werden nicht richtig übersetzt: keine Klammern, keine Beistriche zw. den Parametern
  • Aktualwerte bei den Datenbausteinen wären auch noch super

todo:

  • ein kleiner Bug, der mir noch aufgefallen ist: Wenn der Name der Quelle von vorhanden ist, dann fragt er ob er überschreiben soll. Die neue Dateigröße ist anscheinend über 1 TB groß!?
  • OUT-Parametern werden Lokaldaten anstelle des richtigen Parameters zugewiesen

References to missing DLL

Hi all,

I'm using the library in order to open an existing tia portial project (ap13), in particular I'm working with the ToolboxForSiemensPLCs utility.

When I try to open a .ap13 file I get and exception telling me that the Siemens.Engineering.ClientAdapter.dll is not found.

I've installed TIA portal v13 SP1 and there isn't such a DLL in my setup.

May someone help me please?

Best Regards,
Luca Casagrande

Error read PLCTag as String

  1. Found a bug: file PLCTag.cs, line 1655:
    Do you think the length of the string buff [startpos + 1], but it is: buff [startpos + 1] * 256 + buff [startpos]
    or: BitConverter.ToInt16(buff, startpos)

now my error:
I have PLCTag:

                curTag = new PLCTag() { DataBlockNumber = number};
                curTag.ByteAddress = 0;
                curTag.ValueChanged += ValueChangeEvent;
                curTag.TagDataType = TagDataType.String;

curTag has ArraySize is 1 and read only 3 byte: 2 byte is length + 1 char
but length is 20: ( buff [startpos + 1] = 0, buff [startpos] = 20)
After the first reading should be changed ArraySize

Bug getting source from "Sources" folder

When getting the text from a s7 generated source +I and +D dissappears from the obtained text

I used the FC3560 from the project i sent you before, on the last networks i get this text from ProjectBlockInfo.GetSourceBlock(true);

z354: U     "DB_FZ_TRACKING".BW_388[2].StaFlag.Belegt; 
  SPBN  z355; 
  L     1; 
  L     "DB_TRACK_ZAEHL".BW_388; 
      ; 
  T     "DB_TRACK_ZAEHL".BW_388; 
z355: U     "DB_FZ_TRACKING".BW_388[3].StaFlag.Belegt; 
  SPBN  z356; 
  L     1; 
  L     "DB_TRACK_ZAEHL".BW_388; 
      ; 
  T     "DB_TRACK_ZAEHL".BW_388; 
z356: NOP   0; 

END_FUNCTION

and opening the same source block, from the s7 manager has the following code

    z354: U     "DB_FZ_TRACKING".BW_388[2].StaFlag.Belegt; 
          SPBN  z355; 
          L     1; 
          L     "DB_TRACK_ZAEHL".BW_388; 
          +I    ; 
          T     "DB_TRACK_ZAEHL".BW_388; 
    z355: U     "DB_FZ_TRACKING".BW_388[3].StaFlag.Belegt; 
          SPBN  z356; 
          L     1; 
          L     "DB_TRACK_ZAEHL".BW_388; 
          +I    ; 
          T     "DB_TRACK_ZAEHL".BW_388; 
    z356: NOP   0; 

    END_FUNCTION

Conversion from Date to S7 Date and time is no correct

The millisecond conversion is not correct. I changed the function "putDateTimeat" in file libnodave.net.cs

This is what I changed:

        tmp = mydatetime.Millisecond;
        tmp = tmp / 10;
        rem = mydatetime.Millisecond % 10;
        b[pos + 6] = Convert.ToByte((tmp / 10) << 4 | tmp % 10);

        tmp = (int)mydatetime.DayOfWeek;
        b[pos + 7] = Convert.ToByte((rem) << 4 | tmp % 10);

Best Regards

Bert Degrave

Reachable PLC discovery

I made an class that discovers available accesible CPU's (only by means of TCP/IP) on an network. This is currently part of an internal project of mine, but i want to integrate it into this Library. It comes with an WinForms dialog, that can be used. It is tested with S7-300, S7-400 and IBH Softec Simulation PLC.

Problem is, it is written in VB.net, not C#. So there are two options.
Should i Implement it as an sepárate Library, or Convert everything to C# to integrate it into this library (I dont know when y will have the time to do so). Which Option do you prefer, or do you have an better solution?

Bausteinattribute von S7Classic

Hallo,
ich möchte von S7-Bauteinen die Attribute (Erstellsprache, Version, Name (Header), Autor, Familie, Änderungsdatum, letzte Schnittstellenänderung) auswerten.
Leider bekomme ich keine oder falsche Werte angezeigt.

Meine Coderealisierung:
For Each baustein In s7ProgrammOrdner.BlocksFolder.BlockInfos
If baustein.blockname = "FC4" Then
block= baustein.GetBlock
End If

Attributergebnisse:

SimaticManager PLCToolBoxLibrary Ergebnis Objekt
Erstellsprache BlockLanguage Nothing DataTypes.Blocks.Block).BlockLanguage
Version Version 12.11 Falscher Wert (11.15) DataTypes.Blocks.Step7V5.S7Block).Version
Name Name Nothing DataTypes.Blocks.Block).Name
Autor Autor IO
Familie Family Nothing DataTypes.Blocks.Step7V5.S7Block).Family
Änderungsdatum LastCodeChange Bei UDT's #1/1/0001 12:00:00 AM# DataTypes.Blocks.Step7V5.S7Block).LastCodeChange
letzte Schnittstellenänderung LastInterfaceChange Bei UDT's #1/1/0001 12:00:00 AM# DataTypes.Blocks.Step7V5.S7Block).LastInterfaceChange

Hier die Quelle zum BeispielFC4:

FUNCTION "Symbolischer Name" : VOID
TITLE =Bausteintitel
//BausteinKommentar
//Zeile2
AUTHOR : Autor
FAMILY : Familie
NAME : 'Name'
VERSION : 11.15

BEGIN
NETWORK
TITLE =Netzwerkkommentar

 U     "E_1.0"; 
 =     "m_cam_active"; 

END_FUNCTION

Was mache ich falsch?

S7-400 Online blocks when connected via Slot 0

While making some tests with various S7-400 (CPU414-3DP on Slot 3 and an Ethernet CP443-1 on Slot 5).
I observed the following. the PLC accepts connections via Ethernet not only on Rack 0 Slot 3, but also on Rack 0 Slot 0. The interesting thing is, that one can List the online blocks on Slot 0 and there are event some SDBs in the range of 1003 to 1012, but NOT the blocks that are loaded in the CPU. The Blocks of the CPU are only listed when connected to Slot 3 on the PLC.

From what i understand the Blocks 1000 and above are configured connections and Profibus Connections. I find it interesting that something is responding on Slot0 and does have System Blocks. Does anybody know as to why that is, and also what the content of the SDB's is?

Here i Uploaded the Binaries for the blocks i found online:
Online Blocks form S7-400 Slot 0.zip

Reading from a adjusted (Symbol or Comment) Instance DB

Hello,

I found an issue while reading from an Instance DB.
I am using Step7 V5.5 + SP4.

After defining and calling a FB, Step7 and DotNetSiemensPLCToolBoxLibrary (ToolboxForSiemensPLCs) are showing the same content:

Step7:
image

ToolboxForSiemensPLCs:
image

After changing a Symbol or Comment in the FB, Step7 updates the corresponding DB:
image

When I open the DB with DotNetSiemensPLCToolBoxLibrary (ToolboxForSiemensPLCs), it returns still the old Symbol "InitVarname" and old Comment "Initial Comment". After a real change of the FB-interface (for example adding a parameter) and "Check and update Accesses", the Library shows the correct values. But, after a Symbol or a Comment change, an Access update will not be executed.

S7_pro1.zip

Language support

Hi, I was wondering if its possible to parse different languages when reading symbols and datablocks, i guess when user is changing the language in the simatic manager the language information is taken from somewhere and written in the corresponding database files.

do you have any information where this language file is? or how is it done internally?

Project in TIA Portal V13 Upd6 Problem with opening

At this moment:
tiaPortal = new TiaPortal(TiaPortalMode.WithoutUserInterface);
When i wont to open project i have error "Connection to TiaPortal failed."
When we look inside in the library Siemens.Engineering.dll

string fullPath = Path.GetFullPath(Path.Combine(ApplicationEntryPoint.Loaction, "../../bin/Siemens.Automation.Portal.exe"));

So we must move project to C:\Program Files (x86)\Siemens\Automation\Portal V13\Bin\PublicAPI\V13 SP1 ?? and from there start ?

Also is another problem with TIA.
When Im trying to "PLCListBlocks"
at this point :
int ret = _dc.ListBlocksOfType(Helper.GetPLCBlockTypeForBlockList(myBlk), blocks);
I have error: Error: no message defined!
ret is: -33028

Bug in Block Interface Parsing from MC7

Today y found some bugs in the Interface Parsing section of the MC7Converter, namely the in Parameters.cs. When y did some testing with some unusual code code blocks from one of my clients.
I already Identified them, but more testing needs to be done.

I found the following Bugs:
-When BLOCK_SFB are used in the Interface, for example when calling SFB14 "GET" as MuiliInstances, then the code enters an Endless loop.
-The handling of BLOCK_xx Interface declarations is not correct. So if one of these is used, it Parsing will probably fail.

I am already putting together an Pull Request, for fixing the issues, especially the Endless loop thing.

GetCallingString issue

When using method getcallingstring in an expanded structure from an instance db there should be an option to disable getting the IN, OUT, IN_OUT, STATIC identifiers in the name since that is not how they have to be typed when that signal is used in s7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.