ni / niveristand-scan-engine-ethercat-custom-device

Provides NI Scan Engine, EtherCAT and Remote IO support for NI VeriStand
MIT License
16 stars 22 forks source link

Add Test to Ensure Modules Properties Are Not Lost When Being used to Create New Modules #146

Closed oscarfonloz closed 3 years ago

oscarfonloz commented 3 years ago

:warning: PR 143 must be merged first into main.

TODO: Check the above box with an 'x' indicating you've read and followed CONTRIBUTING.md.

What does this Pull Request accomplish?

  1. Added a new test to ensure we do not lose module's properties when setting and getting their data across multiple slots
  2. Fixed the style of a couple of existing tests to make them more readable

Why should this Pull Request be merged?

Expands our test suite and ensures we do not break functionality as we keep expanding the scripting API

What testing has been done?

Ensured all tests run and added more

rtzoeller commented 3 years ago

Please update the PR title.

oscarfonloz commented 3 years ago

Please update the PR title.

Thanks! Done 👍🏻

niveristand-diff-bot commented 3 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Get Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Get%20Slot.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9224.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209224.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9225.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209225.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get Propagation.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%20Propagation.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20Slot.vi.png)
Scan Engine Scripting.lvlib--Create Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting.lvlib--Create%20Counter%20Driven%20Output%20Module.vi.png)
Scan Engine Scripting.lvlib--Create Digital Input and Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting.lvlib--Create%20Digital%20Input%20and%20Output%20Module.vi.png)
Scan Engine Scripting.lvlib--Read Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting.lvlib--Read%20Counter%20Driven%20Output%20Module.vi.png)
Scan Engine Scripting.lvlib--Read Digital Input and Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-07/18%3A32%3A08/Scan%20Engine%20Scripting.lvlib--Read%20Digital%20Input%20and%20Output%20Module.vi.png)
niveristand-diff-bot commented 3 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Get Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Get%20Slot.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9224.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209224.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9225.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209225.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get Propagation.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%20Propagation.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20Slot.vi.png)
Scan Engine Scripting.lvlib--Create Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting.lvlib--Create%20Counter%20Driven%20Output%20Module.vi.png)
Scan Engine Scripting.lvlib--Read Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/16%3A32%3A26/Scan%20Engine%20Scripting.lvlib--Read%20Counter%20Driven%20Output%20Module.vi.png)
niveristand-diff-bot commented 3 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Get Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Get%20Slot.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9224.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209224.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9225.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209225.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get Propagation.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%20Propagation.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20Slot.vi.png)
Scan Engine Scripting.lvlib--Create Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting.lvlib--Create%20Counter%20Driven%20Output%20Module.vi.png)
Scan Engine Scripting.lvlib--Read Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-08/18%3A02%3A46/Scan%20Engine%20Scripting.lvlib--Read%20Counter%20Driven%20Output%20Module.vi.png)
rtzoeller commented 3 years ago

We seem to be using two different patterns for calling Get Slot.vim.

In the new test, we are passing a new class constant to specify the type: image

In some of the existing tests, we pass the existing class wire: image

I have a slight preference for the first approach, as the second approach will pass if Get Slot.vim just returns the input. Can you update just the tests which are already modified by this PR to use this approach throughout?


Why is Allow Polymorphic VI to Adapt to Data Type being re-enabled for Create Counter Driven Output Module.vi?

oscarfonloz commented 3 years ago

We seem to be using two different patterns for calling Get Slot.vim.

In the new test, we are passing a new class constant to specify the type In some of the existing tests, we pass the existing class wire

I have a slight preference for the first approach, as the second approach will pass if Get Slot.vim just returns the input. Can you update just the tests which are already modified by this PR to use this approach throughout?

I agree, I will change those in this PR and ensure they pass.

Why is Allow Polymorphic VI to Adapt to Data Type being re-enabled for Create Counter Driven Output Module.vi?

Because I'm dumb and forgot to remove that VI, too 😂 Thank you!

niveristand-diff-bot commented 3 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Get Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-11/12%3A16%3A25/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Get%20Slot.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9224.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-11/12%3A16%3A25/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209224.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get 9225.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-11/12%3A16%3A25/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%209225.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set and Get Propagation.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-11/12%3A16%3A25/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20and%20Get%20Propagation.vi.png)
Scan Engine Scripting API Custom Device Unit Tests.lvclass--test_Set Slot.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-11/12%3A16%3A25/Scan%20Engine%20Scripting%20API%20Custom%20Device%20Unit%20Tests.lvclass--test_Set%20Slot.vi.png)
Scan Engine Scripting.lvlib--Create Counter Driven Output Module.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-scan-engine-ethercat-custom-device/PR-146/2021-01-11/12%3A16%3A25/Scan%20Engine%20Scripting.lvlib--Create%20Counter%20Driven%20Output%20Module.vi.png)