Sharing a shared network variable between two PC's connected to a network

Sharing a shared network variable between two PC's connected to a network
Surely this shouldn’t be so difficult! I have a little LabVIEW program running in the background of PC1. The exe’s task is to collect and send OPC variables held on a SCADA system and convert them to shared network variables (as I thought that they would be easy to share over a network, easier than the nasty OPC and DCOM issues). I have PC2 which runs measurement studio and I have created a nice test VB program which either writes or reads the network variables which are on PC1. The PC1 collection software is working perfectly and when I change the values on the SCADA system I can see the network variable change on ‘NI Distributed System Manager’. I When I look at ‘NI Distributed System Manager’ on PC2 I can’t see PC1 on the list and when I use the basic measurement studio code below to read the network variable it times out at the TestVariable.connect() line.
Ok so what do I need to do to read a shared network variable sat on PC1 from PC2 on the network
Public Class Form1
Private WithEvents TestVariable As NetworkVariableSubscriber(Of Double)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TestVariable = New NetworkVariableSubscriber(Of Double)("\\192.168.58.139\Test\TestVariable")
TestVariable.Connect()
End Sub
Private Sub TestVariable_Data_Updated(ByVal sender As System.Object, ByVal e As NationalInstruments.NetworkVariable.DataUpdatedEve​ntArgs(Of Double)) Handles TestVariable.DataUpdated
TextBox1.Text = e.Data.GetValue
End Sub
End Class

Sorry lost all the formatting
Surely this shouldn’t be so difficult! I have a little
LabVIEW program running in the background of PC1. The exe’s task is to collect
and send OPC variables held on a SCADA system and convert them to shared
network variables (as I thought that they would be easy to share over a
network, easier than the nasty OPC and DCOM issues). I have PC2 which runs
measurement studio and I have created a nice test VB program which either
writes or reads the network variables which are on PC1. The PC1 collection
software is working perfectly and when I change the values on the SCADA system
I can see the network variable change on ‘NI Distributed System Manager’. I
When I look at ‘NI Distributed System Manager’ on PC2 I can’t see PC1 on the
list and when I use the basic measurement studio code below to read the network
variable it times out at the TestVariable.connect() line.
Ok so what do I need to do to read a shared network variable
sat on PC1 from PC2 on the network
Public Class Form1
    Private
WithEvents TestVariable As NetworkVariableSubscriber(Of Double)
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
TestVariable = New NetworkVariableSubscriber(Of
Double)("\\192.168.58.139\Test\TestVariable")
TestVariable.Connect()
End Sub
Private Sub TestVariable_Data_Updated(ByVal sender As
System.Object, ByVal e As
NationalInstruments.NetworkVariable.DataUpdatedEve​ntArgs(Of Double)) Handles
TestVariable.DataUpdated
TextBox1.Text = e.Data.GetValue
End Sub
End Class 

Similar Messages

  • "Sharing" a stateful session bean between two servlets, beans

    Hello!
    I just started to learn some java ee programming and was wondering how i would share one stateful session bean between two servlets.
    I created the bean with @Stateful.
    I tried to inject the stateful bean in both servlets by @EJB and i can manipulate the object, but each servlet seems to have its own object.
    The bean has a remote interface that it implements.
    What i also tried was to add the mappedName to the @Stateful expression. Something like: @Stateful(mappedName="name") and to use the bean by @EJB(mappedName="name") but it had no effect.
    Im using glassfish 2.1 with netbeans 6.7.1 as my environment (standard settings)
    dummy question, but i googled like hours and couldnt find anything : \
    hope someone can help and sorry for my bad english
    greets and thanks

    Hi there!
    I think you are searching for something like an application wide singleton. There is the possibility to define such one in the Glassfish admin console.
    Hope this helps!

  • Sharing target application between two external data connections

    If I want to create two BDC connections to two separate external systems (let's say one is for HR system and one for IT admin system), can I use the same Target Application in the secure store service section if both of them use the same authentication? 
    Let's say both external systems allow access for 'admin1' user.  Then, when setting up the external data connection I use 'impersonate windows identity' and create a target application in secure store service to map a set of users to that 'admin1' account. 
    When I create these two external data connections can I specify the exact same 'target application' or should I create two separate ones, one for each external system?
    thanks,

    Hiya,
    If you want to use impersonate, you do not need to use Secure store. Impersonation is granting the service account delegation permissions. This is part of the Kerberos authentication protocol, which needs to be configured separately.
    All secure store does, is to store a set of credentials encrypted. These stored credentials can be used wherever, as long as they are valid.

  • How can I share Pin variable between two packages?

    Hi every one,
    Is there any one who knows how can I share Pin variable that it is defined with OwnerPin between two packages in java card( with eclipse 3.1),I studied Sharing Interface subject and I knows it teorical but I can not do it practical .
    I can share primitive data type but I can not share Ownerpin.
    If anybody has some sample codes or knows any link ,please inform me.
    My code is same as below:
    //In Server Side
    package ginaPack;
    import javacard.framework.*;
    public class GinaApplet extends Applet implements GinaInterface{
    OwnerPIN pin;
    private GinaApplet (byte[] bArray,short bOffset,byte bLength) {
        pin =new OwnerPIN(PIN_TRY_LIMIT,MAX_PIN_SIZE);
              byte PinTemp[] = new byte[4];
              PinTemp[0] = (byte) 0x31;
              PinTemp[1] = (byte) 0x31;
              PinTemp[2] = (byte) 0x31;
              PinTemp[3] = (byte) 0x31;
              pin.update(PinTemp, (short) (0), (byte) PinTemp.length);       
        public Shareable getShareableInterfaceObject(AID clientAID,byte parameter)
              return  this;
        public OwnerPIN getPinShareable()
             return pin;         
         public void process(APDU apdu)
                      //there are some codes in this here
    }//Interface in Server side
    public interface GinaInterface extends Shareable
          public OwnerPIN getPinShareable();
    }//In Client side
    import ginaPack.*;
    public class UserCardApplet extends Applet {
    private UserCardApplet(byte[] bArray, short bOffset, byte bLength) {
         //there are some codes in this here
    public boolean select() {
              final byte[] Gina_AID={(byte)0x47,(byte)0x69,(byte)0x6e,(byte)0x61,(byte)0x41,(byte)0x70,(byte)0x70,(byte)0x6c,(byte)0x65,(byte)0x74};
              AID GinaAID = JCSystem.lookupAID( Gina_AID, ( short )0,( byte )Gina_AID.length );
              if ( GinaAID == null ) // probably not loaded on card
                        ISOException.throwIt( ISO7816.SW_FUNC_NOT_SUPPORTED );//6a 80
              GinaInterface ff = (GinaInterface) JCSystem.getAppletShareableInterfaceObject(GinaAID,(byte)0);
              if( ff == null )
                   ISOException.throwIt((short)0x0903);
    if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false;
    }My problem is in this line :
    "if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false; "when I select my applet this line throw an exception, ff.getPinshareable includes all of OwnerPin methods(such as getTriesRemaining ,check ,reset, update ,...)but all of them throw exception .
    I think firewal does not allow other packages uses this methods .If my guess is right then what should I do for sharing the variables that they are defined with non primitive data type such as (OwnerPin,Signature,...)
    I'd appriciated for any help.
    yours sincerely,
    Orchid.
    Message was edited by:
    NewOrchid

    Applet 1:
    package com.package1;
    import javacard.framework.*;
    public class Applet1 extends Applet {
        private static final byte tryLimit  = (byte)3;
        private static byte[] pinBytes = {(byte)1, (byte)7, (byte)4, (byte)5, (byte)2};
        private Library1 lib;
        protected Applet1(byte bArray[], short bOffset, byte bLength) throws PINException {
            lib= new Library1(tryLimit, (byte)pinBytes.length);
            lib.update(pinBytes, (short)0, (byte)pinBytes.length);
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet1(bArray, bOffset, bLength);
        public void process(APDU apdu) {
            byte status=(byte)0;
            lib.resetAndUnblock();
            if (!(lib instanceof Shareable)) status += (byte)2;
            if (!(lib instanceof MyPIN)) status += (byte)4;
            ISOException.throwIt(Util.makeShort((byte)0x90, status)); // sw indicates tries remaining
        public Shareable getShareableInterfaceObject(AID cltAID, byte parm) {
            return lib;
    }Library1:
    package com.package1;
    import javacard.framework.OwnerPIN;
    import javacard.framework.PINException;
    public class Library1 extends OwnerPIN implements Interface1{
        public Library1(byte tryLimit, byte maxPINSize) throws PINException {
            super(tryLimit, maxPINSize);
    }Interface1:
    package com.package1;
    import javacard.framework.PIN;
    import javacard.framework.Shareable;
    public interface Interface1 extends Shareable {
        boolean check(byte[] pin, short offset, byte length);
        byte getTriesRemaining();
        boolean isValidated();
        void reset();
    }Applet2:
    package com.package2;
    import javacard.framework.*;
    import com.package1;
    public class Applet2 extends Applet {
        private final static byte CLA_TEST = (byte)0x80;  
        private final static byte INS_TEST = (byte)0x20;
        private final static byte P1_AUTHORIZE = (byte)0x00;
        private final static byte P1_DOIT = (byte)0x01;
        private final static byte P1_CHECK_SIO = (byte)0x0a;
        private Interface1 sio;
        protected Applet2(byte bArray[], short bOffset, byte bLength) {
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet2(bArray, bOffset, bLength);
        public void process(APDU apdu) {
         byte[] buffer = apdu.getBuffer();
            if ((buffer[ISO7816.OFFSET_CLA] == CLA_TEST) ||
                (buffer[ISO7816.OFFSET_CLA] == ISO7816.CLA_ISO7816)) {
                short bytesReceived = apdu.setIncomingAndReceive();
                switch (buffer[ISO7816.OFFSET_INS]) {
                case ISO7816.INS_SELECT:
                    if (!JCSystem.getAID().equals(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                        ISOException.throwIt(ISO7816.SW_APPLET_SELECT_FAILED);
                    sio = (Library1)JCSystem.getAppletShareableInterfaceObject(JCSystem.lookupAID(<fill in parameters>);
                    if (sio == null)
                        ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);            
                    break;
                case INS_TEST:
                    switch (buffer[ISO7816.OFFSET_P1]) {
                    case P1_AUTHORIZE:
                        if (!sio.isValidated()) {
                            if(!sio.check(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                                ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));
                        break;
                    case P1_DOIT:
                        if (!sio.isValidated())
                            ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                        sio.reset();
                        ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));                
                        break;
                    default:
                        ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);                   
                    break;
                default:
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
            else {
                ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }1. Upload package1
    2. Install Applet1
    3. Select Applet1
    4. Upload package2
    5. Install Applet2
    6. Select Applet2

  • Two Issues: Cannot connect to wireless networks; Cannot load certain sites

    Hey everybody,
    I have a MacBook Pro 15".
    In just the past week, I've stumbled upon two sudden problems with my network/internet connectivity.
    First, I can no longer connect to wireless networks, be it an infrastructure point or computer-to-computer ad-hoc networks. I'm not really sure why. I installed the latest AirPort Update (4.2.3, according to System Profiler). I also recently installed both iStumbler and KisMac v.21. When I started having issues, I thought that maybe one of these two programs might be the culprit, so I uninstalled both of them but I still have the same problem.
    Second, I've had issues with not being able to connect to certain websites. I use both Safari and BonEcho as my browsers. The specific sites seem random:
    www.weffriddles.com
    www.macrumors.com
    images.google.com
    sports.yahoo.com
    finance.yahoo.com
    to list a few.
    If you need any diagnostic information, please let me know.
    Thanks in advance for any advice/help you can provide!
    Tommy H.
    MacBook Pro   Mac OS X (10.4.9)   browsers: Safari, BonEcho/ Airport Driver Version: 4.2.3

    If you are trying to connect to a third-party router using WPA or WEP, there is a good chance that your Airport card was broken by Apple's 2007-02 Airport Update. There is no fix, and for many of us, our Macbooks and Macbook Pros are useless for wireless connections until Apple fixes the issue. At this point, Apple seems to be denying that there even is an issue, so we may all be in for a long wait indeed.
    See this thread if you have some time:
    http://discussions.apple.com/thread.jspa?threadID=883021&tstart=0

  • Sharing a Global variable between two Labview applicatio​ns

    Hello,
    A.exe and B.exe created by Labview 8.21. Both A.exe and B.exe run on the same PC. A and B exchanges data through a Global variable. Everything goes well if I launch both VI in Labview but when I try to launch the built executables A.exe and B.exe I get an error 1059. In B.exe I just use the Open Reference.vi icon to which I connect the path of the other application (A.exe) that already runs.
    So the general question here is: how can I open a reference to labview application A from another labview application B, both running on the same computer.
    Thanks for any hint,
    Christophe

    With a user ID# of 298, you have been using LV for quite a while.
    Review the release notes for LV 8.0 LV 8.2 etc and you will see that that two different exe's run in different contexts.
    I'd use a LV2 and VI server to read and write. VI Server will let you use TCP/IP to talk between the two contexts.
    Ben
    Message Edited by Ben on 01-15-2008 12:50 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Sharing an external hard drive between two macs

    Could someone please give me step-by-step instructions on how I can share an external hard drive between my powerpc(running 10.4.11) and my macbook air(running 10.5.6)? I would like to do this with out any external software.

    Anthony1900 wrote:
    Could someone please give me step-by-step instructions on how I can share an external hard drive between my powerpc(running 10.4.11) and my macbook air(running 10.5.6)? I would like to do this with out any external software.
    Simply connect the drive to one of the two computers and there you are!
    Use your network and turn on file sharing. It's that simple.

  • Sharing a single itunes library between two computers - must be possible!

    Hi there,
    This is probably a commonly asked question, but I cannot find a step by step guide to doing it (if indeed it is possible).
    I have got a copy of itunes running on my media computer/server in my living room. What I want is to connect my laptop over the network and share this library - the effect being that it is like I am using the original computer.
    In essence I want to be able to add muscic, edit tracks, update my ipod from either computer and the changes be made in respect of both computers. I suspect that this is done by making sure that the laptop uses the same database information as that created by my main computer but am not really sure where to start.
    Could anyone perhaps give me a step by step guide as to how to do this - a single database that can be used by two computers each running itunes. One thing I am pretty sure is not possible is to for two people to be using itunes at the same time, so I would ahve to avoid this.
    Thanks very much.

    Ah. Sorry about that, I guess I skimmed over the add music part. Correct, in that the home sharing wouldn't allow you to add music to the media server library. The only thing that I can think of that would give you what you want is to use a shared folder on the network and then map both of the iTunes to that folder. At least that way music would go into the same folder. The only question is about the library on the other computer, if it would get updated when you use the other to add music.

  • Is there any way to shared Lync SIP address space between two organizations for long term coexistence as in the email world?

    -EnabledSharedAddressSpace is this an option is this only for Lync hybrid in office 365

    Hi mombu,
    Sharing of sip domain is not possible in Lync.
    The DNS record for automatic sign in can only point to the Edge server of one Lync environment.
    If user who is from different environment tries to login to Lync externally using automatic sign in, they will be directed to the Edge mentioned in the DNS record and 
    will get a 404 error because Lync server does not recongnize the user and will not be able to login to Lync.
    Possible solution:
    Change sip address of the users of one Lync environment and configure federation between the two sip domains.
    Change will require change of sip address of users.
    Change of certificate for Edge and reverse proxy.
    Change of SRV records.
    Contacts needed to be removed and added with correct sip address.
    Meeting needs to be rescheduled .
    Central forest solution:
    Create a forest trust between the two forests.
    Use Lync server of one environment.
    Configure Lync for a central forest topology
    https://technet.microsoft.com/en-us/library/gg398173.aspx
    by creating contacts for each user from the other domain and enable the contact for Lync.
    All users will have the same sip domain and can login using their login credentials but will be hosted on the Lync server in one forest.
    Best regards,
    Eric

  • Sharing a Time Machine backup between two Macs

    Hi
    So I was running my music production software on a first gen Mac Mini.  I would store all of my project files on an external drive and backup that external drive to a second external drive using Time Machine.  I had Time Machine set so that it excluded everything on the Mac Mini except my original external drive.
    Now I've stepped up to the latest and the greatest Macbook Pro 15 inch.  I'm running the same music production software on it and loading up all my files from the same external drive.  When I go to back it up with Time Machine, it wants to start a separate backup for the Macbook Pro, even though it is only backing up the same stuff from the Mac Mini.  The thing is that there aren't any system specific files being backed up, just my project files.  For the life of me I can't get it to continue the original backup.  I plan on using both Macs for music production and plan on using the same drive for both.  I would like to back up every time I finish a session on either computer.
    Is there anyway I can get Time Machine on each computer just continue one backup??
    I know I can access the backup from each computer by "Browsing Other Time Machine Disks", but I want to backup, not restore.
    If not, is there any other software you can recommend?  Although I would hate to lose the backups that I already do have...
    Thanks!
    jg

    That's probably a good option for you. It's not easy to keep a 3 way sync.
    If you really want to keep certain files synced on your Mac Mini, you might want to look at ChronoSync. It appears it's a good backup-sync program. Don't know if will keep synced between the 2 computers and external drive without a little manuel effort, but would be easy to sync at least 2 devices, such as MacBook to Mac Mini, or MacBook to external.
    If you don't need to keep synced files, then best option is to do a full TM backup of both computers. Since you have 2 externals, use one for each. You can still use TM to access files if you need, and if you have a hard drive failure, it's an easy replace drive and restore the whole computer from TM.
    And don't overlook the option of File Sharing between the 2 computers to access each others files or a shared folder. That's a real easy way just to copy a few files when you need them.
    Anyway, Good Luck and Happy Holidays

  • Sharing the same Aperture Library between two Mac's?

    gents does any of you manage to share the same Aperture Library between your iMAC and a MacBook?
    How can I do it without risking to lose anything or to jeopardize the integrity of my library backup?
    the idea is to work on Projects while I am on the move and placing them back into my Main Library sitting on my iMAC at home...
    Thx!
    P

    For each project you want to work on, CTRL + Click the project and "Export -> Project as new library". These new temporary libraries can be moved to your MacBook for working on.
    When you come back, import the libraries back to your main Aperture Library with "File -> Import -> Library" and choose to merge your changes. The changes you made will be added to your main library. The temporary libraries can then be deleted.
    Deleting them avoids the temptation of working on them later, possibly creating conflicts. It best to export new copies from your main library each time you work away so you know you have current up to date versions.
    -Najinsky

  • Sharing the iweb website creation between two macs in the same house?

    I have an imac. Just purchased a macbook for the wife that arrives tomorrow. She wants to be able to update our website using her imac (a website I've started and maintained on the imac).
    My question is...is it possible to "sync" the iweb application or to otherwise let her have access to the same info I see on the imac so she may update the site as well from her own mac?
    We are connected in the house via a wireless network.
    Thanks.

    Clayton ~ These links may help:
    http://docs.info.apple.com/article.html?artnum=303045
    http://iwebfaq.org/site/iWebTwocomputers.html
    And click on the thumbnail to check out ChronoSync:

  • How to access a Network Share between two servers in same data centre

    I have two dedicated servers (both Windows 2012 Server) hosted in a data centre somewhere.   I want to share a folder on one server with the other server, but it's obviously not as straight forward as one might think.  My servers are called "Maximus"
    and "Apprentice".
    On Maximus I shared a folder by right clicking on it and choosing "Share with... / Specific People", I then typed in the name of a local user account which also exists on Apprentice with the same name and password.  (so each server has a local
    user account with the same name and password).
    So then on Apprentice, I was hoping I could access the share (while being logged in as this user with whom the folder was shared) by simply typing  "\\ipaddress\sharename" into the address bar in file explorer.  Unfortunately it comes
    back with "Windows can not access [ip address]".
    Now, I do have a website setup on the IP address for Maximus.  This is actually the reason I want to create this share.  I need the second server for load balancing and need to share IIS config as well as the website itself.  (So I will need
    two shares eventually, but for now I'm just trying to get one to work).  I don't know if the fact that the ip address is pointing to the website is causing me problems here or if it's something else.
    Are there any network gurus out there who can tell me what the issue is and how to resolve it?

    I can ping both servers in either direction, but I believe I may have found the problem.  Apparently my host is blocking port 445 which Windows wants to use to connect to the share and they will not unblock it.
    Is there a way to connect to the share through a different port?  
    To my knowledge, you cannot change the port. However, you can try disabling your security software for testing. If this fixes the problem then you need to adjust your security software configuration so that traffic on this port is not blocked or filtered.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Networking question between two ibooks...simple answer I'm sure (doh!)

    I have an older ibook, clamshell, with OS 10.1 installed (no firewire). I also have a newer ibook (14" white) with OS 10.4.7. I want to transfer files from the clamshell to the newer ibook. I understand that I use a crossover ethernet cable to set up a local network. What I want to arrive at is seeing the hard drive icon on the newer ibook desktop and be able to drag and drop from there, but I'm confused about how to get to that point, having read about Public folder (not what I'm shooting for). In the past, I've had a kind tech support help, but unfortunately didn't take notes on getting the hard disc icon onto the [client?] computer desktop.
    Sometimes I think I know a fair amount about my computers, other times---like now--I don't. Thanks in advance for guidance. Paul

    It sounds like you are trying to connect to the
    machine from which you are connecting. If all is
    well, and both machines have sharing turned on, you
    should see 2 machines in the local network browser.
    One will be the one you are on, the other should be
    the remote machine.
    Assuming the local network browser is the window that comes up when I hit command K, I see no list. Both windows (Server Address, and Favortie Servers) are blank.
    Make sure you have sharing turned on, on the remote
    machine.
    Done
    Make sure the two machines have different names (set
    this in the sharing configuration)
    I did this, yes. Rebooted both computers and the new names came up in the Sharing window).
    All i can figure is that perhaps the ethernet cord is either funky, or not what I am perceiving as crossover. I may try a couple of other cords I have as well. I saw the mention of IP addresses, but doesn't this only have to do with sharing via the internet?
    I like to give the machines IP addresses (e.g.
    192.168.0.10 and 192.168.0.20), so that I can "ping"
    one machine from the other machine, to be sure I've
    got connectivity, before I damage the wall with my
    head.

  • Variables between two swfs

    I have a main.swf (level0)and a news.swf (level1). News.swf
    is loaded because main.swf tells it so :-). If I have a variable in
    news.swf, does it become part of the main.swf? I want to send a
    variable from news.swf to main.swf, so the main.swf knows which swf
    must load after event in news.swf. Which is the best way to do
    that? Is it a LocalConncetion?
    THX for advice

    rohai wrote:
    > I have a main.swf (level0)and a news.swf (level1).
    News.swf is loaded because
    > main.swf tells it so :-). If I have a variable in
    news.swf, does it become part
    > of the main.swf?
    Not it does not becomes part of the main.swf but there is no
    problem to access
    the variables across multiple levels tho. _level1.vars=value;
    or _level0.vars=value;
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

Maybe you are looking for