ni / niveristand-ballard-milStd1553-custom-device

Custom device for Ballard MIL-STD-1553 hardware
MIT License
2 stars 4 forks source link

Add Decimation and Async Rx execution options #230

Closed Karl-G1 closed 2 years ago

Karl-G1 commented 2 years ago

What does this Pull Request accomplish?

Why should this Pull Request be merged?

Enable users with lots of Rx 1553 message endpoints in a system to not block the PCL if it is permissible for this custom device to run at an effectively reduced loop rate.

With 3x custom devices and a PCL rate faster than the custom device can execute, there is noticeable contention in the Rx and Tx execution units visible due to jitter spikes in their execution duration. This points to potential improvements to reducing contention, but this is still a helpful addition for users whose system would fail timing for higher-speed tasks.

What testing has been done?

Hand testing plus ran automated tests against the ATS hardware.

VI Tester results ![image](https://user-images.githubusercontent.com/31290917/192001374-c379149a-ab91-478d-9ad2-7f773b86e0f8.png)
HP Loop Duration with Inline custom device execution on 3x instances ![image](https://user-images.githubusercontent.com/31290917/192001537-9ad93a11-4ab7-408e-aeb0-5652cb429255.png)
Execution duration of Rx and Tx with 3x instances and Rx async ![image](https://user-images.githubusercontent.com/31290917/192001805-fdea8b99-3f31-4e75-a100-ac220062c010.png)
niveristand-diff-bot commented 2 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.

Ballard MIL-STD-1553 Engine.lvlib--Implementation.lvlib--Execution Unit Factory.lvclass--Create Execution Unit.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-22/17%3A55%3A33/Ballard%20MIL-STD-1553%20Engine.lvlib--Implementation.lvlib--Execution%20Unit%20Factory.lvclass--Create%20Execution%20Unit.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Constants.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-22/17%3A55%3A33/Ballard%20MIL-STD-1553%20Scripting.lvlib--Constants.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Get Rx Async.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-22/17%3A55%3A33/Ballard%20MIL-STD-1553%20Scripting.lvlib--Get%20Rx%20Async.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Set Rx Async.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-22/17%3A55%3A33/Ballard%20MIL-STD-1553%20Scripting.lvlib--Set%20Rx%20Async.vi.png)
Ballard MIL-STD-1553 System Explorer.lvlib--Implementation.lvlib--Main Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-22/17%3A55%3A33/Ballard%20MIL-STD-1553%20System%20Explorer.lvlib--Implementation.lvlib--Main%20Page.vi.png)
niveristand-diff-bot commented 2 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.

Ballard MIL-STD-1553 Engine.lvlib--Implementation.lvlib--Execution Unit Factory.lvclass--Create Execution Unit.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20Engine.lvlib--Implementation.lvlib--Execution%20Unit%20Factory.lvclass--Create%20Execution%20Unit.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Constants.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20Scripting.lvlib--Constants.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Get Decimation.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20Scripting.lvlib--Get%20Decimation.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Get Rx Async.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20Scripting.lvlib--Get%20Rx%20Async.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Set Decimation.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20Scripting.lvlib--Set%20Decimation.vi.png)
Ballard MIL-STD-1553 Scripting.lvlib--Set Rx Async.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20Scripting.lvlib--Set%20Rx%20Async.vi.png)
Ballard MIL-STD-1553 System Explorer.lvlib--Implementation.lvlib--Main Page.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-ballard-milStd1553-custom-device/PR-230/2022-09-23/10%3A49%3A47/Ballard%20MIL-STD-1553%20System%20Explorer.lvlib--Implementation.lvlib--Main%20Page.vi.png)
bariskarkar commented 2 years ago

Asynchronous execution results are better. I have a question about theory of operation. When two MIL-STD-1553 custom devices are running, are they works parallel like image below? Execution time is approximetely 2500us at this operation. If it is like that what's the disadvantegas of this? There is one more thing I don't understand. How exactly does decimation work and what are it's advantages?

Async