Network bound variable on daqmx channels

Hi all,
I have a VI that runs fine reading data through Daqmx.
I also have a 2nd vi running on another pc that has network shared variables bound to some digital in daqmx channels on the 1st PC.
The problem is if i run this at the same time as my 1st vi,my 1st vi no longer processes the digital inputs (i.e.i switch to on and off and nothing happens), do i need to create network shared variables that i populate from the daqmx ones on the first pc and read those across?, im just wondering if its because you cant read the daqmx channels through the daqmx vis and also try to read them through network bound variables?
hope that makes sense
Mike

Duplicate post.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies

Similar Messages

  • Network shared variables lose binding

    Hello,
    I am developing an application in LabVIEW that uses network shared variables to transmit data between two PC's on the same subnet. The shared variables work fine when running the VI's in development mode, however, when i build the vi's into an executable I find that they no longer work. Here is what I have found so far:
    I deploy the shared variable library on the publisher machine (also happens to be the development machine) through an invoke node in the executable. NI distributed system manager confirms that this does deploy and indeed updates as it should.
    For the executable on the subscriber PC I created a second shared variable library (same project) with the same shared variables and bound them to the respective shared variables from the first library by selecting enable aliasing, then bind to PSP URL and browsing to the shared variable I wish to bind it to (e.g. \\hallnet-ellm2\shared variable library\serial Number). The machines listed under browse were listed by name so when I tried this initially and it did not work I manually changed the name of my machine in the URL box to the IP address of the publisher hoping that would fix it in case the subscriber could not resolve the publishers machine alias. So now my bind URL read \\192.168.0.1\shared variable library\serial Number.
    As part of the executable on the subscriber I deploy this second shared variable library. NI distributed system manager confirms that this deploys but under quality for an individual variable it has a list of issues (see attached) and the bound variable is not updating. At this point the publisher shared variables are still functioning fine. By clicking on 'edit variable' I can see that the variable on the subscriber is still bound but the PSP URL is now \\localhost\shared variable library\serial number. Changing the PSP URL on the subscriber to \\192.168.0.1\shared variable library\serial number enables the variable to update as expected.However by this time my executable has already picked up the error and does not function.
    I think that the issue lies with the bind URL used on the subscriber as for some reason it does not keep the binding configured in the project and instead changes to 'localhost'. Why is this? Should it not stay bound to the address specified in the project?
    I have tried changing the IP addresses in the aliases file so that
    [My Computer]
    My Computer=localhost 
    becomes
    [My Computer]
    My Computer=ip of local machine
    This did not help.
    The shared variable libraries are included in the build spec to go into the support files directory and they are successfully deployed from there on both publisher and subscriber.
    I am using LabVIEW 8.6 on Windows XP
    Thanks for any help you may be able to offer,
    Lee
    Attachments:
    distributed system manager.JPG ‏74 KB

    Hi Lee,
    I hope you are well.  Thank you for your post.  Your application sounds very interesting.
    Looking at your issue I was wondering, have you tried lowering your firewalls, as this may be causing the problem.
    Also, another option would be to setup a private network.  Do you have access to any routers that you could use to link the two machines independent of your IT's infrastructure?
    The other thing to try is two other computers entirely.  Again, it would be ideal to take them off the network you are on, but it's something to try if my prior suggestion doesn't work.  It should work on the original two machines though, and it's likely that different computers won't solve your problems because I suspect the network.
    Remember that the client variables must know the location of the variables on the server, so you can't move the server exe around without changing this value.
    Make sure to set the network location in the "Bind to Source" option for the client variables.
    It is also possible to write a separate piece of code to install on every machine that is responsible for deploying the library and by doing so eliminate the need for programmatically deploying the variables in the original application.  However, this won't really help you, because the variables you use in the application have to be the same as the ones deployed in the library, so if you change the library, they'll no longer be linked and they won't receive data.  You'd have to create a separate exe for every binding source you wanted to link to, and then have a second, known library for the sake of communication locally on the computer between the ‘deployer’ and the actual application.  The main application could then be assigned the responsibility of launching the correct ‘deployer’' if it sees it needs to switch to a different variable binding source.  This method is not the most streamlined or effective, but it might work.
    Just to let you know, you will need to use the DSC toolkit.
    Please find below some knowledge base links that I think you will find helpful in your application.
    Using Shared Variables in Executables
    How do I Programmatically Change the Data Binding Source for Shared Variables?
    I hope this information helps and if you can give these suggestions a go and let me know how you get on, that would be great.
    Kind regards,
    Prashant M
    Applications Engineer
    NI UK & Ireland

  • Network Shared Variable Description

    Hi,
    I've created alot of Network Shared Variables through Project Explorer...and i have also added a description for each one in the shared variable properties screen
    Could someone please tell me how i can get access to the description through LabVIEW?
    Many thanks
    Mike

    Hi attached is a sample of code in which i am viewing a value and also its description.
    Ideally id just like to have the channel name once and the description and value be taken off that, rather than if i ever change it , then have to change the input to the description and also the variable displaying the value. Hope that makes sense
    Regards
    Mike
    Attachments:
    opctest3Kep for forum.vi ‏19 KB

  • Lab View crashing when creating new bound variable

    Hi,
    I have to connect to an OPC server from Lab view and have played around a bit with the OPC client options.
    I would like to use shared variables as that seems like a handy way to access the needed variables. I have followed the instructions in http://zone.ni.com/devzone/cda/tut/p/id/7450 .
    However when i use the create bound variables feature LabView crashes when i browse for OPC tags, step3 under "Create Shared Variables that Connect to the OPC Tags through the I/O Server". If i try to expand the node "OPC1" LabView crashes. I try to access the built in NI OPC server locally.
    Also during this process LabView gives warning box saying "Configure OPC server to run with an identity of interactive user". we did try the the steps in http://zone.ni.com/reference/en-XX/help/371618G-01/lvdschelp/config_local_opc_serv/ . However the The interactive user button was disabled under NI OPC sever properties.
    Is there something i have missed? Something that needs to be configured before going through that tutorial?
    I run LabView 2011 on a 64 bit Win7P computer. The DSC module and the NI OPC Servers are installed and seem to work (when running the OPC examples ).
    Thanks.

    Hello AmritaNikhil,
    Thanks for the post, I have a few questions for you about this issue.
    What versions of NI OPC Servers are you using?
    Is the server hosted on your local machine or on a remote machine?
    Are you able to successfully connect NI OPC Servers and NI OPC Quick Client?
    Have you been successful in using OPC IO Servers in the past or has this issue occurred since you have started your application?
    Can you consistently reproduce this crash?
    You can try to work around this issue by using Network Items rather than Project Items when creating bound variables in the Create Bound Variables window. Please try this option and let me know if you have any additional information about your application that may be helpful in solving this issue. In addition, I have also included a link to a similar post. Hope this helps!
    LV 2011 crash when create bound variables
    http://forums.ni.com/t5/LabVIEW/LV-2011-crash-when-create-bound-variables/m-p/1879137
    Paul-B
    Applications Engineer
    National Instruments

  • Change a DAQmx channel property for a single channel from a channel group

    Hi,
    I'm doing some digital output, and I'd like to tristate certain lines in each port. However, I'm having difficulty figuring out how to specify which individual lines to tristate. I input a port and a line range, e.g. PXI-6533/port0/line0:7, specify to use one channel for each line in the DAQmx Create Virtual Channel VI, retrieve the channels from the DAQmx Task Property, and try to operate on the individual channels that way.  However, this results in the following error:
    Error -200428 occurred at Property Node DAQmx Channel (arg 1) in tristate_test.vi
    Possible reason(s):
    Measurements: Value passed to the Task/Channels In control is invalid.
    The value must refer to a valid task or valid virtual channels.
    Task Name: PXI-6533/port0/line0
    The NI knowledge base article that deals with this error code talks about creating a task with the DAQ assistant, or ensuring that a task has been created. However, I'm not using the DAQ assistant, as my I/O is pretty complicated; I'm just using a bunch of virtual channels. 
    Is there a way to specify individual channels to changethe properties of without having to create additional virtual channels? I have 48 digital channels I plan to use, so the less virtual channels I have to create the better. 
    Please reference the attached VI, which demonstrates the problem I am facing. 
    Thanks for any assistance. 
    Attachments:
    tristate_test.vi ‏11 KB

    You can only software-time tristate for the 6533/6534. Have a look at the attached example.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies
    Attachments:
    tristate6533.vi ‏58 KB

  • Distributed application: Networked Shared Variables, Named Services (Raw TCP/IP) or Other?

    Happy New Year NI forums! 
    I am working on a project involving mobile interacting robots. In the future it is likely the application's components may need to run on different PCs (Targets). Note: at this point in time all the components are seperate but all running on the localhost machine. Thinking towards the future I want to pick the 'best' architecture to allow all these components (VIs performing various functions) in multiple locations. For example, several VIs on the Robots, VIs on serveral PCs. 
    I am  currently aware of using Server/Client TCP/IP using named services. My mock up works well, but is it time efficient (my time coding) I wonder.. ?  
    Whereas I am aware of networked shared variables which handle connections and all the parsing for the underlying tcp/ip communication. But will this be difficult the manage? I am unsure if I can associate shared variables with a VI similar to named services. I suppose I could pro grammatically create the variable upon initialization of the server component - and the client could just search the list of avaiaible variables to connect too. Downside this would require DSC module. 
    As you can see, I am rather unsure. Any advice would be great!
    Kind Regards,
    James  
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

    Hi Jason,
    Thanks for your reply. I hope your enjoying NI UK as much as I did.. fun times!
    I have seen the link you posted a few times before. But today, I took a better look at it.
    My issue is I need several multi-client severs, i.e. many servers which allow multiple clients to connect to them.
    Now the STM does have an example of this - STM mutli-client Example - Server.vi (used with the STM mutli-client.vi)
    However, when a make copies of these code (to have my second server) - it refuses to run. As in , it just stops itself.
    I DID change the port number, on the lister aspect of the server code. But I Am unsure what else I would need to change to get this setup to work?
    One thought I had was, the FIFOs all having the same name - this probably isn't a good idea between servers.
    Any suggestions would be grateful!
    *please could you provide me email support
    Kind Regards,
    James Hillman  
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!

  • Several DAQmx Channels with Start and Clear Task VI's

    Hi,
    I'm trying to read in several DAQmx channels in a while loop. When I just place the channels within the while loop and connect them directly to the read VI's, everything is fine. But I read in the help, that this will slow down my system, because it's opening and closing the task each cycle. So I used Start Task and Clear Task VI's to open and clear them before and after the loop. But now it's only reading one of my channels in, although I wired all of them in exactly the same manner. Anyone has an idea, what I did wrong?
    Thanks,
    Miclas
    Attachments:
    Save&Stop DAQ.JPG ‏87 KB

    You would have seen the error if you had wired up and error indicator.
    You cannot run multiple tasks of the same type (i.e. an analog input) at the same time. What you read about stopping and closing tasks is correct but it was the only way your program could work. What you don't realize is that you can have multiple channels with a single task. If you used a physical channel constant, it would be something like 'dev1/ai0:2' if you had consecutive channels or 'dev1/ai0, dev1/ai2' for non-consecutive. Global channels are done in a similar fashion. You would have 'FSR1, FSR2, Knee Angle', etc.

  • RT Network Shared Variable and Visa Serial Instr class

    Hi,
    I'm using Labview 2009 SP1 with the RT module. I've had no problems creating a RT Target application and a Host PC application which are interconnected using Network Shared Variables, until I came to the COM ports fitted to the RT Target (PXI Embedded Controller and 2 x 4 port COM cards).
    I can configure and use the COM ports in the RT Target application providing I use constants to define which COM port to use, i.e. VISA OPEN function accepts hardcoded "COM2" , (VISA Serial Instr class).
    But I want to pass the COM Port resource name from my host application. 
    Is there a suitable Network Shared Variable I can create ? or how do I change the string value (COM Port name) of the VISA Serial Instr class variable in the RT Target application ?
    thanks,
    Gary.

    Hi there Gary,
    Thanks fot the post. I think I have found something that may be if use to yourself.
    http://labviewwiki.org/Functional_global_variable
    This is the functional global variable.
    Take a look at it and let me know what you think!
    Many thanks,
    Liam A.
    National Instruments
    Applications Engineer

  • Network Shared Variable: Aliasing not working

    Hello!
    I am running a cRIO 9075, which is publishing network shared variables.
    I can see and modify them within Distributed System Manager.
    Unfortunately I am not able to read/write the variables through labview.
    What I have done so far:
    Tools -> Shared Variable -> Register Computer, using the IP of the cRIO
    Adding a Variable to the project. Type = Network-Published, Enable Aliasing, choosing "Browse" to select the variable (all published variables from cRIO are shown there), Access Type = read/write. The PSP-URL is: \\192.168.10.70\WaveformManager\Op
    Trying to read the variable results code -1950679034 and the result is always the default value for that data type.
    BUT this works: using the VIs Data Communication / Shared Variable / Read/Write Variable  and typing in the same URL the Distributed System Manager is showing is showing (in my case: \\192.168.10.70\WaveformManager\Op)
    So, what am I doing wrong? Did I forget something or misunderstand how "Aliasing" works?
    Thanks!

    hi,
    in which way to you read your shared variable? If you read it before you write  a value "into" the variable it may couse this waring.
    Have you tried this?
    http://digital.ni.com/public.nsf/allkb/7DBC2C3E95AFD85C86257442005CF74C?OpenDocument

  • Can I write to Modbus I/O Server addresses without creating bound variables?

    Hi all,
    I'm wondering if it's possible to use the Modbus I/O Server without explicitly creating bound variables?
    If I write a value to the bound variable at "ni.var.psp://My Computer/Slave/300001", the master can see the value.
    The variable properties paeg says that the variable is bound to "My Computer\Slave.lvlib\ModbusSlave1\300001"
    I deleted the bound variable and tried a few different ways to write directly to the I/O Server, but all of them gave me Error 0x8BBB0005. I tried the following:
    ni.var.psp://My Computer/Slave/300001
    ni.var.psp://My Computer/Slave/ModbusSlave1/300001
    ni.var.psp://My Computer/Slave.lvlib/ModbusSlave1/300001
    ni.var.psp://My Computer/Slave.lvlib/ModbusSlave1/300001
    I also tried replacing "My Computer" with "localhost" above. No luck.
    Is there anything I've missed? I'm asking because CPU usage is very high, and I thought I might be able to reduce that a bit by removing the 300 bound variables in the system.
    Solved!
    Go to Solution.

    You can use DataSocket with a path like psp:\\localhost\Slave\ModbusSlave1.400001 for read and write access.
    Check out the example VI "Monitor OPC Items with DataSocket.vi" in the LabVIEW examples.

  • Inconsiste​nt Network Shared Variables

    I will eventually be implementing a controls program on a machine using cfp. Before the cfp gets here, I am getting practice in network shared variables by trying to pass shared variables between two VIs on my computer. I have attached the two VIs and a screen shot of my project. I run a queued state machine and after the initialization routine is done, I run the control portion of the program. The control program is titled 'The4Mprocedure2.vi' and the QSM is titled '4M_QueueDrivenStateMachine'. In the initialization routine of the QSM, 'FALSE' is written to the boolean network shared variable, 'Run_4M_Procedure'. After the initialization routine is done, and a set of certain parameters are met, the QSM writes the value 'TRUE' to 'Run_4M_Procedure'. Ideally, The4Mprocedure2.vi would read the shared variable, and when the value is 'TRUE' The4Mprocedure2.vi would run. The4Mprocedure2.vi has a case statement that causes to run the program when 'Run_4M_Procedure' = TRUE. The4Mprocedure2.vi does not run when the variable is FALSE.
    The problem that I am having is that The4Mprocedure2.vi does not always recognize that the value of my shared variable has changed. When the QSM passes the value of 'TRUE' to the controls program, The4Mprocedure2.vi will sometimes still read the network shared variable as FALSE. Sometimes, I have to restart the controls program several times while the QSM is running to ensure that 'TRUE' is passed to the controls portion. Why does my controls program not recognize when the network shared variable changes values?
    Message Edited by tquintana55 on 07-14-2008 11:04 AM
    Attachments:
    The4MProcedure21.vi ‏87 KB
    ProjectScreenShot1.JPG ‏68 KB
    4M_QueueDrivenStateMachine1.vi ‏131 KB

    Hi tquintana55,
    I believe your Issue is related to the methods that LabVIEW subscribes to the shared variables. Here is a link to a related article:
    How to Avoid the "0" Value at First Read of a Shared Variable in LabVIEW 8.5.x?
    To resolve this you can move your Run_4M_Procedure inside the while loop.
    Sappster

  • Network shared variables reconnecting network dropout

    I've got a cRIO unit communicating with a Laptop using Network Shared Variables, with one of them being a 21 index array that is buffered.
    The system connects and communicates fine, but occassionally the wireless card in the laptop is losing the signal from the WAP attached to the cRIO.
    When this happens the Network Shared Variables never "reconnect" and start receiving values again once the Wireless link is restored.  Is this an expected behavior?
    When I tried using another industrial WAP instead of the laptop wireless card I do not get the drop-outs.
    Ryan Vallieu
    Automation System Architect
    Solved!
    Go to Solution.

    Hello Ryan,
    Thank you for contacting National
    Instruments!  I have looked into the issue you are experiencing and
    wanted to ask you a few more questions.  First of all, do you have a
    time frame in which you allow for the reconnect?  I believe that the
    Shared Variables should regain connection after a short period but it
    will not necessarily be a very quick process.  It may take a few
    minutes for the Shared Variables to reconnect.
    The other
    thing that may be happening is if you have error wires being passed
    through the Shared Variables, it is possible that the error is not
    being cleared and so it will always see the error and therefore never
    reconnect.  In this case you will have to filter this error out and
    then clear the error in order to utilize the shared variables again.
     If
    you have any more specific information about your program that may help
    us determine the reason for this behavior.  Also a screenshot of your
    code would also be helpful.  Please let me know if you have any further
    questions and I will be happy to assist you.  I hope this helps!
    Thanks!
    Bob H
    Applications Engineer
    National Instruments

  • Network-Shared Variable - read string with CVI

    I need to read an NSV string with CVI.  I have been digging into accessing and writing NSV with CVI, but they are all scalar value.  What should I do with strings, clusters and arrays?

    'm an employee at National Instruments and I wanted to make sure you didn't miss the Network Variable API that is provided with LabWindows/CVI, the National Instruments C development environment. The the Network Variable API will allow you to easily communicate with the LabVIEW program over Shared Variables (http://zone.ni.com/devzone/cda/tut/p/id/4679). While reading these links, note that a Network Variable and a Shared Variable are the same thing - the different names are unfortunate...
    The nice thing about the Network Variable API is that it allows easy interoperability with LabVIEW, it provides a strongly typed communication mechanism, and it provides a callback model for notification when the Network/Shared variable's properties (such as value) change.
    You can obtain this API by installing LabWindows/CVI, but it is not necessary to use the LabWindows/CVI environment. The header file is available at C:\Program Files\National Instruments\CVI2010\include\cvinetv.h, and the .lib file located at C:\Program Files\National Instruments\CVI2010\extlib\msvc\cvinetv.lib can be linked in with whatever C development tools you are using.
    Thomas N.
    Applications Engineer
    National Instruments

  • Bound variable types and how to tell?

    is there a way to tell what type a bound variable (really the column its being used against) is?
    i am writing a generic sql application and need to find out what type a bound variable is so i can convert the value to the appropriate type to allow the use of indexes.
    is there an easy way to do this without having to write a lame (slack) sql lexor and interrogate the database?
    does occi automagically do this for me?

    Yes, you have to use MetaData. If you executed a statement and got the Resultset, you can use rs->getColumnListMetaData() to get the information about all the columns that are fetched. But if you want to know before executing (eg: for setXXX() on Statement) then you will have to use con->getMetaData() and describe the tables.

  • How do I Delete DAQmx Channels

    I am pretty much a novice to LabVIEW, and many of you may see this as a very easy question, but how do i remove DAQmx channels (If this is the correct term, or is it tasks?).
    I have been playing about, and seem to have a few redundant channels and wish to remove them. I have been looking for a while now and can't seem to find it anywhere.
    Solved!
    Go to Solution.
    Attachments:
    Removing DAQ Channels.jpg ‏74 KB

    You need to open DaqMX by clicking:
    Once DaxMX is open you need to open the channels area:
    THen you need to right click on the channel or task that you want to delete and select the delete function.
    Tim
    Johnson Controls
    Holland Michigan

Maybe you are looking for

  • I keep getting the little blue box with the question mark

    Hi I have 10.6.7 system software and my safari is 5.0.4 I have called apple twice with this problem already but nothing has helped except for short times. I have reset safari about one dozen times and when I do I reset the top 7 items and I've emptie

  • Page numbering from an Excel file

    I would like to use a list from a csv excel file for page numbering. For example instead of having the pages numbered 1,2,3,4,5,6..... I want them to be labeled one, two, three, four, five six.... I have tried using a data merge from the master page

  • New mac mini sees other macs, other macs can't see mini

    I just added a new mac mini to my home network. File and screen sharing is on, so is back to my mac. The mini can see the other shared macs on the network, but the mini doesn't show up in the shared list on the other macs. Any help correcting this wo

  • Troubles connecting apple tv to applestore

    apple tv is connected, i see all the contents and my mac itunes from it, but it doesn't connect to the applestore, i tried in many ways but when i try to rent a movie it just keep loading black. I've properly entered my apple id and so on but it keep

  • Z10 - Rear Camera Autofocus Stopped Working

    Hi, I have recently noticed that the rear camera on my Z10 has stopped autofocusing. I have close up photos on my phone that I have taken over Christmas, that are perfectly sharp and in focus, but now everything I take is out of focus. The focusing b