Skip to content

Commit

Permalink
Merge pull request #143 from StefanHasensperling/master
Browse files Browse the repository at this point in the history
Bug fix in the GetSZL function
  • Loading branch information
jogibear9988 authored Dec 6, 2019
2 parents 00c8c0d + 5e82827 commit 4c599a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion LibNoDaveConnectionLibrary/Communication/PLCConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ public void PLCDeleteBlock(string BlockName)
/// <param name="SZLNummer">The System State list Number</param>
/// <param name="Index">The System State sub list number</param>
/// <returns></returns>
public SZLData PLCGetSZL(Int16 SZLNummer, Int16 Index)
public SZLData PLCGetSZL(UInt16 SZLNummer, UInt16 Index)
{
lock (lockObj)
{
Expand Down Expand Up @@ -1686,6 +1686,18 @@ public SZLData PLCGetSZL(Int16 SZLNummer, Int16 Index)
}
}

/// <summary>
/// Upload an System State list (SZL) from the controller that hold configuration, state and capability information
/// For information about SZLNummbers and indexes please consult the information from SIEMENS regarding SFC51 "RDSYSST"
/// </summary>
/// <param name="SZLNummer">The System State list Number</param>
/// <param name="Index">The System State sub list number</param>
/// <returns></returns>
public SZLData PLCGetSZL(Int16 SZLNummer, Int16 Index)
{
return PLCGetSZL((UInt16)SZLNummer, (UInt16)Index);
}

/// <summary>
/// Read the Controllers Diagnostic buffer containing controller events
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion WPFToolboxForPLCs/DockableWindows/ContentWindowSZL.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
App.clientForm.lblStatus.Text = "";
try
{
SZLData szlData = App.clientForm.Connection.PLCGetSZL((short) szlid, (short) szlindex);
SZLData szlData = App.clientForm.Connection.PLCGetSZL((ushort) szlid, (ushort) szlindex);

myDataGrid.Columns.Clear();

Expand Down

0 comments on commit 4c599a5

Please sign in to comment.