01-08-2017 03:33 PM
Good day everybody
I had following issue with User Event passed by global variable or FGV.
1. In main application User Events are obtained and send to external app to appropriate control. References are stored in global variable
2. Start external app in which User Events are register:
3. In Main application Event User named "Control Mode" is generated based on reference read from global variable:
Unfortunatelly I am getting the error number 1
"Possible reason(s):
LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
=========================
NI-488: Command requires GPIB Controller to be Controller-In-Charge"
I checked synchornization run of main code versus external application.
The flow is as described above.
I have tried global FGV with no differences.
Remark
I noticed also when casting User Event reference to variant (for FGV purpose) then it was not possible to cast it back to reference (error 91).
It looks like the reference passed by any means is then not recognized when received.
When reference is connected directly from Obtain to Generate Event the it is OK !!
Has anybody experienced similar issue?
Do I miss something?
I appreciate any suggestion
MM
01-08-2017 06:17 PM
Based on what I have seen, I think I would use the Asynchronous Call By Reference. That would allow you to use the connector pane to pass the references into your called VI.
01-09-2017 12:49 AM
Hi Crossrulz
Thank you fro remark. Started external app. vi method Run VI which was beyond the first screenshot area. This old school aproach works fine.
Using asynchronous call with connector pane is just more compact on block diagram.
My problem with User Event Generate (error 1) when reference is passed via global, FGV still remains.
I tried also FVG with Obtain function and Generate Event inside. It does not help.
See pictures below:
Notice please, on picture above casting from variant to User Event reference is giving already error 91. I mention that in previous post.
User reference constant has been created from the output of Obtain function.
User reference constant should be same type as references created from Obtain function, however constant contains zero value whlist reference created each time, some number.
Can it be that LabVIEW treats those two references (constant and newly created) as a different type?
I think I have gone too far ;-/
Another FGV that I tried to use to pass User Event references is typical:
At the moment I don't see any better solution like creating additional booleans in external app. sending the data to them from Main app. and use of value signaling property to make external app. reactive.
I appraciate any suggestion.
MM