Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in the GetSZL function #143

Merged
merged 3 commits into from
Dec 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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