01-15-2018 12:41 PM
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
01-15-2018 01:25 PM
From the diagram, that looks like a non-standard VI. You need to dig through the original code base to find the function.
01-15-2018 01:26 PM
@sparkyt wrote:
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
01-15-2018 01:29 PM
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?
01-15-2018 01:37 PM
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
01-15-2018 01:45 PM
@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.
Ben