FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to close a communication session with the FP Server?

Looking at NI's FieldPoint Demobox.vi example, the session is closed by wiring the FP Refnum out from the FP Create Tag vi for the AI module to the FP Close vi. Is there any difference if the FP Refnum out from any or all of the other FP Create Tags were wired to FP Close vi/vi's? Could the FP Refnum out from the FP Open vi be wired to the FP Close vi? What is the best way to do this?

Also, as I'm new to FP and I'm conscious that I might swamp this forum with dumb questions, are the any sources of good FP code examples and/or discussions on coding techniques out there beyond the handful of NI's examples?

Thanks again,

Niel.
0 Kudos
Message 1 of 3
(4,790 Views)
Niel,

The FP Open.vi provides a FP Refnum in the form of a data cluster. The cluster contains two elements; a server refnum and a tag refnum. Coming out of the FP Open, only the server refnum has a value, the tag refnum is created when the FP Create Tag.vi is processed. Thus all FP refnums in a process have the same server refnum but different tag refnums. The FP Close.vi uses the server refnum to close the server and ignores the tag refnum so it does not matter which particular refnum was used to close the server. The thing to be careful of is if you close on refnum, you close all refnums. At this point, any reads/writes/advises will result in error 32804 (Invalid IA handle specified).

Also, please swamp this forum with questions. I am in the process of reviewin
g the documentation and examples we provide and having a beginner asking questions that do not appear to be covered in our materials gives me an idea of what we are missing. I would ask that you upgrade to FieldPoint Explorer 2.0.4 and use the online help for LabVIEW since that has had some of my modifications added to it (program flow outlines, vi descriptions & use cases).

Regards, Aaron
Message 2 of 3
(4,789 Views)
Aaron,

Thanks for the clear and concise response - just what I need.

I downloaded FP Explorer 2.0.4 yesterday but hadn't got round to installing it. I will make it a priority on your advice. I'm looking forward to seeing what examples, etc are on it as I feel that the biggest problem I have (and probably other beginners) is the lack of a good cross section of robust code examples (how best to handle errors in a critical app, how best to handle multiple/various FP modules, etc) and tips/hints from the experts. The few (and it is quite a small number) examples from the web, etc are fairly simple and don't go very far in answering a lot of questions that the beginner might have. I hope these comments are of some use.

Prepare to be swamped!

Best Reg
ards,

Niel.
0 Kudos
Message 3 of 3
(4,790 Views)