Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Error -1950678986 Using Shared Variables Bound to Fieldpoint I/O Items

Hardware: Compact FieldPoint

Problem:
I have a shared variable bound to a channel on my FieldPoint and whenever this channel goes Out of Range my shared variable reads are returning an error -1950678986 Unspecified shared variable error. Is this expected behavior when my FieldPoint channel goes out of range? How should I handle this?

Solution:
This is expected behavior of the shared variable and should be handled in your application. One example of a proper way to handle this would be to watch for this error and display an appropriate message to the user as shown in Figure 1.

Figure 1: Block Diagram

Pass the error out of the shared variable into an Unbundle By Name function. Then, if the error code is equal to -1950678986 and an error has occurred (status=true) then display a message ERROR: Value out of range to the user. If the error code is not equal to this number then you could display a Value good message to the user. Figures 2 and 3 show how this would look on the front panel of your VI.

Figure 2: Front Panel with Normal Status



Figure 3: Front Panel with Out of Range Status



Related Links:
KnowledgeBase 3UG7KQY3: What Are The Options For Binding A Shared Variable To My FieldPoint Channels?
KnowledgeBase 3S8AETIH: Troubleshooting Network-Published Shared Variables
Developer Zone Tutorial: Using the LabVIEW Shared Variable

Attachments:


block_diagram.JPG - block_diagram.JPGfront_panel_good.JPG - front_panel_good.JPG
front_panel_outofrange.JPG - front_panel_outofrange.JPG



Report Date: 10/27/2006
Last Updated: 11/03/2006
Document ID: 42QH4NCW

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit