Random Ramblings on LabVIEW Design

Community Browser
Labels
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Ping Dialog

swatts
Active Participant

Happy Thanksgiving! or Merry Thankfulmas as I like to call it.

As a grumpy, anti-social, vegetarian Brit the thing I'm most thankful about is that we don't do thanksgiving here. (and don't get me started about Black Friday!!!)

To make up for my grumpiness I thought I'd share this useful little dialog. I've deliberately made it using only primitives as part of my war on dependencies, feel free to make some subVIs if this offends you.

 

It displays the network addresses available on the PC and then parallel pings everything on the selected subnet. It then allows you select a target IP Address, which it outputs. I'm using it to load images onto selected cRIOs in case you were wondering

Hope it saves you some time, time you could spend with your family or in a traffic jam

Lots of Love and gratitude

Steve

It's LabVIEW 2015 btw

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Comments
Swinders
Member

Nice example and it does show a use of enabling Iteration Parallelism in For Loops. Unless you are using 64 logical processors then you are also oversubscribing the parallel instances which looks to work well as the 'ping' operation will have plenty of waiting time.

 

One interesting (I find it interesting) point is if you use retain wire values and highlight execution then everything appears to stop when execution reaches the for loop, then looks to skip to the output nodes after some time. Dropping a probe on any of the wires inside the for loop will return 'No Debug Info'. I guess this is not unexpected but still something to consider if using this feature.

 

Nice work as always.

Steve Swindley (CLA since Feb 2008)
swatts
Active Participant

Thanks matey, as I did it I thought it would make a good example, I often need a real world advantage for it to stick in my head.

Regarding the debugging issue, that's a really good point. I think that's why I resist doing "clever". I love debugging and anything that gets in the way is a huge disadvantage IMO. In this case the use case weighs in favour of (performance) vs (ease of debugging), but that is actually a rarity in our code.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

joerg.hampel
Active Participant

 Just in case that this is not general knowledge: You can enable debugging in the properties of the For Loop Iteration Parallelism dialog windows (what a name!):

 

parallel.png

 

Edit: It's worth mentioning that execution is done sequentially if debugging is enabled.




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


swatts
Active Participant

How does that then differ from not having parallel execution set?? Need to do some tests I think.

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

joerg.hampel
Active Participant

I think it just lets you debug your code without having to rewire it (i.e. changing the for loop on the block diagram back to sequential execution).




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)