LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Occurrence.vi replacement in newer LabView releases

CreateOccurrenceSnippit.png

Hello,

I am very new to LabView, so please pardon my greenness.

I recently was tasked with trying to update a vi we use for product testing. Only issue that I haven't worked around is what to replace the Create Occurrence.vi with in the newer releases of LabView. I have searched through topics and have made no progress. At the point now that it may make some sort of sense to install the older version just so I can see what is actually going on. LabView 2014 doesn't include the Create Occurrence.vi, I have tried wait for state with no luck. The '?' in the above vi is my problem. Any direction would be greatly appreciated. Hopefully I posted this in the correct forum.

Thank You in advance,

A Newbie

 

0 Kudos
Message 1 of 6
(3,244 Views)

From the diagram, that looks like a non-standard VI.  You need to dig through the original code base to find the function.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,228 Views)

@sparkyt wrote:

CreateOccurrenceSnippit.png

Hello,

I am very new to LabView, so please pardon my greenness.

I recently was tasked with trying to update a vi we use for product testing. Only issue that I haven't worked around is what to replace the Create Occurrence.vi with in the newer releases of LabView. I have searched through topics and have made no progress. At the point now that it may make some sort of sense to install the older version just so I can see what is actually going on. LabView 2014 doesn't include the Create Occurrence.vi, I have tried wait for state with no luck. The '?' in the above vi is my problem. Any direction would be greatly appreciated. Hopefully I posted this in the correct forum.

Thank You in advance,

A Newbie

 


You had me scared there for a second.

 

All of the occurence functions are still there in LV 2017. What you are showing seems to be a VI associated With Device net. Have you chased down DeviceNet to find the missing VI?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 6
(3,226 Views)

I have never heard of a Create Occurrence .VI in LabVIEW.  LabVIEW 2017 still has occurrences, so if this VI you speak of was a part of LabVIEW, it would probably still exist.

 

I think your VI is a subVI that someone created.  What version of LabVIEW was this code created in?  What path is LabVIEW looking for this subVI when it can't find it?

0 Kudos
Message 4 of 6
(3,222 Views)

Occurrences are still in the palette in LV 2016 so I strongly suspect they're in 2014.  The fact that the 'Wait on Occurrence' primitive shows up in your snapshot helps confirm that.  The 'Generate Occurrence' primitive is basically a unique diagram constant, not a full subvi with input terminals as shown by the "?" in your snapshot.  

 

What's more likely is that the API for your DeviceNet stuff (with which I have no familiarity at all) has changed and the library or driver you're using no longer includes the missing vi that used to return an Occurrence as output.   There's likely a different vi you should be using that *IS* part of the version of DeviceNet interface you're using.  Maybe it returns an occurrence, or maybe it uses a different signaling mechanism.   If the latter, you'll need to adapt your application code accordingly.

 

In general, notifiers are usually preferred over occurrences these days whenever you get to make the choice for yourself.  They provide error functionality, have a more complete API, and provide a data payload to accompany the signaling.  I don't know what kind of signaling mechanism lies in the latest version of the DeviceNet interface you're using, but it may well turn out that it now returns a Notifier refnum instead of an occurrence.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 6
(3,214 Views)

@Kevin_Price wrote:

Occurrences are still in the palette in LV 2016 so I strongly suspect they're in 2014.  The fact that the 'Wait on Occurrence' primitive shows up in your snapshot helps confirm that.  The 'Generate Occurrence' primitive is basically a unique diagram constant, not a full subvi with input terminals as shown by the "?" in your snapshot.  

 

...

 

 

-Kevin P


Ditto that.

 

In fact the "Generate Occurence" node is a special widget that returns only a single value regardless of how many times that particular node executes. (see my nugget on Occurences here for more info). If you want more than one occurrence I think you will have to drop more than on of the nodes on a diagram or use a dynamically instanciated Vi to create a unique occurence.

 

Spoiler
Kevin, check your messages please

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(3,208 Views)