-
Notifications
You must be signed in to change notification settings - Fork 19
Conversation
If it is a pinned version, check if this Version is available otherwise close the solution Bug fixed: First set the SilentMode and then try to open the Remote Manager otherwise the remoteManger can show a MessageBox
TcUnit-Runner/AutomationInterface.cs
Outdated
@@ -14,7 +14,7 @@ namespace TcUnit.TcUnit_Runner | |||
/// </summary> | |||
class AutomationInterface | |||
{ | |||
private ITcSysManager10 sysManager = null; | |||
private ITcSysManager13 sysManager = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ITcSysManager13 also available in TwinCAT 4020? (TcUnit supports > 4020.0).
Is there anything specific that needs 13 that 10 doesn't have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if ITcSysManager13 is available in TwinCAT 4020.
I do not have version 4020.0 for validation
In 13 you can read out via the SysManger interface whether the version is pinned.
In the current version ITcSysManager13 and sysManager.TcVersionFixed is not used.
can therefore be removed and remain on ITcSysManager10.
public bool TcPinnedVersion { get { return sysManager.TcVersionFixed; } }
Why is sysManager.TcVersionFixed not used? I would like to post something about the general procedure below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has to work with 4020.0, and it has to be validated to work with 4020.0 (as it does now). You can get 4020.0 from the Beckhoff support, or download it via this link: https://www.beckhoff.com/forms/twincat3/warenkorb.aspx?lg=en&title=TC31-Full-Setup.3.1.4020.0&version=3.1.4020.0
TcUnit-Runner/AutomationInterface.cs
Outdated
{ | ||
get | ||
{ | ||
return sysManager.TcVersionFixed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... why do we need the rest of the code (with XML-parsing and everything, GetPinnedVersionXML) if the sysmanager already provides this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I come back why XML parser (only needs ITcSysManager10) and not SysManger.TcVersionFixed
(requires ITcSysManager13)
The ITcSysManager interface only works if the project is loaded.
But the check has to take place before loading. Therefore I could not use SysManger.TcVersionFixed.
If I tried to load a pinned project with a version which is not available, the RemoteManger automatically ( silentMode = true
)
loaded the last version. (no matter if pinned or not)
and automatically upgraded my pinned version to the last version.
At the end of the unit test my project was still pinned, but on the wrong version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that we will never use the SysManager.TcVersionFixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to go to version 4020.0 and check the interface ITcSysManager13.
I assume that it does not work. This would mean we cannot use SysManager.TcVersionFixed from the interface ITcSysManager13
In this test the project is pinned and a version
In this test the project is pinned and a version
In this test the project is not pinned and a version
|
What is the best way to continue? @sagatowski What is your recommendation. |
Looks good @Beidendorfer ! |
@Beidendorfer Just update the code according to the comments above! I will do some internal testing and then I will merge your changes to the main. Thanks a lot! |
Hi @Beidendorfer, impressive work! I'll look at this now. |
@Beidendorfer, I tried to compile the program but I get several compile-errors. |
@Beidendorfer It seems there was just one questionmark too much in the code. I've removed it and now it compiles. |
Did some minor refactoring.
@Beidendorfer Thanks for your contribution! |
If it is a pinned version, check if this Version is available otherwise close the solution
Bug fixed: First set the SilentMode and then try to open the Remote Manager
otherwise the remoteManger can show a MessageBox