EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-23 05:52 AM
Hi
I have a script that allows me to query the Geo SCADA Expert database from Windows Powershell 5.1 and it works fine. When I use the same script with in PowerShell Core 7.4.1 the ClearScada.Client.ServerNode Connect method throws a ClearScada.Client.CommunicationsException when the request timeout expires. I have shortened this request timeout to 15 seconds in the code sample to help speed up the investigation. The exception thrown is not giving me much to go on but I have a sneaking suspicion it is to do with NLog in Geo SCADA Expert.
Here is a short script that will replicate the error:
Import-Module 'C:\Program Files (x86)\Schneider Electric\ClearSCADA\ClearScada.Client.dll'
Clear-Host
$hostName = "127.0.0.1"
$system = "Local"
$clientName = "PS-Client"
# Get username from user, enter accepts default offered which is the logged on user name
if (($username = Read-Host -Prompt "Username [$env:USERNAME]") -eq "") {$username= "$env:USERNAME"}
$password = Read-Host -AsSecureString -Prompt $("Enter Password for {0}" -f $system)
try
{
try
{
$node = [ClearScada.Client.ServerNode]::new([ClearScada.Client.ConnectionType]::Standard, $hostName, 5481)
$node.RequestTimeout=150000000 # 15 Seconds
# Version 6.84
$serverInterface = $node.Connect($clientName, $false) # Returns [ClearScada.Client.Advanced.IServer]
if($password.Length -Eq 0)
{
"No password was entered"
}
else
{
try
{
"Logging on . . ."
$serverInterface.LogOn($username, $password)
if($serverInterface.IsLoggedOn)
{
"Logged in successfully, logging off . . ."
$serverInterface.LogOff()
"Logged off, disposing . . ."
$serverInterface.Dispose()
"Disposed, finished"
}
else
{
"Login failed"
}
}
catch
{
throw
}
}
}
catch
{
"`r`n{0}:" -f $_.FullyQualifiedErrorId
$_.Exception | Where-Object {$_.MemberType -ne 'Method'} | Format-List
}
}
catch
{
Write-Host "An unhandled exception occurred:"
$msg = "`t{0}" -f $_.Exception.Message
Write-Host $msg
Write-Host ''
}
PowerShell ISE and Windows PowerShell are a dying breed and PowerShell Core is where it's all going so I would love to resolve this.
Anyone have any idea how to fix it?
I Am Running
Not working
PowerShell Core 7.4.1 in Visual Studio Code 1.89.1
Working
Windows PowerShell Desktop 5.1.14393.6343 in PowerShell ISE
Both on Windows Server 2016 Version 1607 (OS Build 14393.6897)
Geo SCADA Expert Version 6.84.8218.1
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-28 04:25 AM
If I use the ClearScada.Client.dll from Geo SCADA Expert 6.86.8863.1 in my Import-Module statement I can successfully logon and query from my 6.84.8218.1 database.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-23 08:05 PM
Looks like PowerShell Core 7.4 is using .NET 8, the ClearSCADA.Client.DLL needs .NET 4.8. Some more discussion at https://community.se.com/t5/EcoStruxure-Geo-SCADA-Expert/FYI-Applications-built-on-Net-Core-worked-w... I've not heard of any recent changes to the supported .NET versions
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-24 04:12 AM
Hi Adam, thanks for that, not what i really wanted to hear but thanks all the same. That link didn't work but hopefully this one will:
FYI Applications built on Net Core worked with Geo SCADA 2019
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-28 04:25 AM
If I use the ClearScada.Client.dll from Geo SCADA Expert 6.86.8863.1 in my Import-Module statement I can successfully logon and query from my 6.84.8218.1 database.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-02 03:35 PM
Ooh, that's good to know, maybe they have updated the supported frameworks in Geo SCADA 2023
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-03 03:04 AM
This bug (CSUP-13435) has been fixed in the March 2024 releases of GSE 2022 (6.85.8853) and GSE 2023 (6.86.8863) onward, but was mistakenly missed from the release notes. The fix was tested with .NET Framework 4.8 and .NET 7.
Officially only .NET Framework 4.8 is supported by Geo SCADA 2023 (and earlier versions).
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.