LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change alarm limits of a Shared Variable on a remote machine?

Hello,
 
I have a Shared Variable published by a Shared Variable Engine on a remote node. I would like to programmatically access the alarm limits (HIHI, HI, etc.) of that Shared Variable. Moreover, I would like to change those alarm limits programmatically. My first guess was to use the "SharedVariableIO" property node. Although this works nice on "localhost", it fails if a SharedVariable is defined in a Shared Variable engine on a remote node: Even reading a simple property like the name of the SharedVariable from a remote node fails. The error message is
 
Error -1967362032 occurred at Property Node in test.vi
Possible reason(s):
IAK_SHARED:  (Hex 0x8ABC7010) Initialization failed.
 
Remark: The address of the SharedVariable is correct, since a "DataSocket read" of the value of a SharedVariable works perfectly.
 
Question 0: Does anybody has an idea what this error code means? Neither the NI-Website nor Google do find something...
Question 1: Can the "SharedVariableIO" property node only be used in the "localhost" (I invested quite some time searching the NI web-site but found no information).
Question 2: Is there another way to access properties of a SharedVariable on a remote node programmability?
 
In principle this should work, since the "Shared Variable Monitor" from NI allows to do all this.
 
Regards,
 
Dietrich
 
P.S.
There is a workaround. If the URL of the value of a SharedVariable is \\node\process\variableName ,
then (as an example) the value of the HIHI alarm limit can be accessed via the URL \\node\process\variableName.Alarms.HiHi.level .
However, that approach is not very elegant and I am not sure, if this is not something internal that might disappear in one of the next versions.
 
0 Kudos
Message 1 of 10
(11,280 Views)
Here is a link of a similar question that I had.

If you do a search for DSC (stands for datalogging and supervisory control toolkit) alarm change or DSC change shard variable, you should find a lot of information on the topic.

I am currently running a program and I change the properties progmatically on a remote computer using the method provided in the link.

Good luck.

Kenny

0 Kudos
Message 2 of 10
(11,278 Views)

Hello Kenny,

yes, there is lot of information when searching the web site of NI or Google for information on DSC. Unfortunately, it is quite scattered and in many cases I can't find the information I am locking for (like a detailed description of the error code Hex 0x8ABC7010 or decimal 1967362032). Yes, I am using LabVIEW DSC since about seven years. Things have changed and improved a lot compared to LabVIEW 7.1.

Anyhow: Except the workaround described in my original question, I still don't know how to change the alarm limits of a shared variable on a remote node. Please note, that I want to change the alarm limit on-the-fly, while the process is running. As an example, when switching on the power on an electric device, the electric current will most likely go beyond its alarm limit. So the alarm limit must be changed before and after powering up (or disabled during power up). 

However, the methods described in your link don't work for me. The property node "SharedVariableIO" just works on the local node or at least I can't get it to work for remote nodes. The alternative, changing the properties of the Shared Variable contained in a library, is not applicable for me. This would imply to re-deploy the library on the remote node, which is not such a good idea in a running system. Again: there must be a way to do this, since the "Shared Variable Monitor" allows to change those properties on a remote node interactively. But I need to do this programmatically!

Dietrich

0 Kudos
Message 3 of 10
(11,268 Views)

If you wire a shared variable node (what used to be called a tag) into a property node, you can change properties directly in the variable engine as opposed to changing them in the library file and needing to re-deploy them.

For example, please refer to the attached picture:

  • the upper code branch will disable the HI level alarm associated with the variable
  • the lower code branch will modify the trigger level for the alarm

These changes will take place directly in the engine on the machine the VI the run.

Regards,
Robert
Message 4 of 10
(9,120 Views)
Hello REM1,
 
of course I tried what you suggested. However, I can get this to work only on the LOCAL node but not on a REMOTE machine. This is my problem. I have tried with a bunch of PCs using as well the LV 8.20 DSC development system as well as the LV 8.20 DSC runtime system.  I can't get that to work between two different machines. Have you tried that on a remote machine? Your example just works on the localhost.
 
So far I only managed to change things via the workaround that is mentioned in my first contribution starting this thread. I have attached an example, demonstrating the situation. The example is for reading the description of an alarm limit but setting the alarm limit is just the same idea.
 
Again my question: Does anybody know how to change Shared Variable properties on a REMOTE (!!!!!) machine in a convenient way? Using the workaround described here is ugly.
 
Cheers,
 
       Dietrich
0 Kudos
Message 5 of 10
(7,956 Views)

Does anyone have an answer for this?

 

0 Kudos
Message 6 of 10
(5,071 Views)

I am also having a simlar problem in accessing property node of a shared variable through remote PC. I would like to access Network.OnScan and Description Property of a shared variable remotely.

But the workaround as mentioned above does not work with these property nodes.

Has anybody come across a similar situation?.

 

0 Kudos
Message 7 of 10
(5,028 Views)

I have never tried to update properties on a remote SV, but the error Error -1967362032  is an old friend of mine. As is most of the other error codes relating to SV's. Try to copy all VI's in the vi.lib\lvdsc\ folder from a machine that has just been installed. This sometimes fixes my problem. I realize that this makes very little sense.

/soren

0 Kudos
Message 8 of 10
(4,963 Views)

You can edit any properties regarding a shared variable deployed in a remote PC using sgaredvariableIO propertynode . Only thing you need to have is the cuurect URL for the same. But inorder to make the change effective you need to stop the process first then do the editing then start the process. For starting and stoping a process in remote PC you can find the VIs in ../labVIEW 8.2/vi.lib/variable/tagger/ folder.

 

It worked for me with a remote RT FP.

 

 

Blackperl 

Coding is a combination of intelligent and creative work - someone
0 Kudos
Message 9 of 10
(4,856 Views)

I need a solution to this problem as well.  When I try to read/write to a shared variable property, I get a "initialization failed" error.  Then I went into the remote machine in the "NI Distributed System Manager" and tried to stop the process in there with no success.  Then I tried to run the "Stop Process" vi in the LabVIEW 2009\vi.lib\variable\tagger folder and got an error "Error -2147220717 occurred at ni_tagger_lv_StopProcess.vi"  Mind you I didn't do much coding other than pipe the Machine name and the process name into the "stop process.vi".  I need to get this working.  Please help.

 

Matt

0 Kudos
Message 10 of 10
(4,316 Views)