Write to channel outside custom device

Hi all

I am writing a custom device to control some aspects of my definition of system (more specifically another device custom).  I can't solve this problem because I can't find a way to write about a VeriStand channel located outside my custom device.

Help to get channel reference data (which I usually use to get a data reference so that I could use the channel for the data set Reference.vi) says expressly that I can't get write access to a channel outside of my custom device.

Is it possible for me to get write access to a channel outside my ring custom?

I realize I can create system to the output channels of my device custom maps, but I'm not crazy a whole bunch of mappings of system because they are not very visible, and I would like that the user only need to use my configuration pages.  I also realize that it's probably possible to create these custom mappings by my setup of device programming, but I was not brave enough to venture down this road again...

I use VeriStand 2011 SP1 and LabVIEW 2011 SP1.

Thank you

Chris

Project engineer

Certified LabVIEW Developer

BaseNodeType is part of the Assembly SystemStorage, that something is used internally and is not intended for use by the public.  The publicly documented API is the API of ZFS, which has documentation available and a little easier to use.

In the ZFS API, there is a class called "Utilities" that has a (Source channel, Destination) AddMapping method and a ClearMapping(Channel Destination) method.  These work as expected and disable the mapping entirely (not only the creation of an invalid mapping with value null, like your screenshot).  It would be better to add and remove mappings.

However, if you want to stay with your existing code, I think you can accomplish what you want by removing the method "SetDataSourceValue" and replaching with a method "RemoveProperty.  The name plugged into "RemoveProperty" will remain the same ("DataSource").  This actually completely erases the mapping of the string instead of remapping it on channel zero.

Kind regards

Devin

Tags: NI Products

Similar Questions

  • Read VeriStand channel from inside the custom device that are not part of the custom device?

    Is it possible to read VeriStand channels from within a custom device VeriStand (RT Driver) that are not part of this custom device?

    For example, suppose I want to be able to configure a channel in my custom device to always be twice the value of a string of material that my user selects (I know, better/more simple ways to do this, but this is just a simple example ).  Can I do this from the device custom without programmatically create a mapping of the system? (I've done this before and it is messy and VERY prone to error of the user).

    Thank you!

    good point

    the channel ID (U64s) are not the same in the engine config of vs. Instead, you must set 'references to dependent item' in the config and then get these references in the engine.

    See the source jarrod linked, which makes it

  • How to detect the channel delete event in a custom device

    I am creating a custom device and want to detect when you press the button Delete (X) in the system browser.  This is so I can increment or decrement a counter in a folder (where the channel is under).  I saw no option in UserEvent loop options.  How do I detect that a channel is deleted?, I'm sure it's easy, but I can't seem to understand.

    Thank you!

    I recommend usually do not do that... If you can avoid it. For example the parent folder can do if everything is just a child get point-> the size of the array to count channels rather than storing a property that could get out of sync. I always try to design my devices do not store the property values for things I could go get.

    That being said... Sometimes you don't have that. You want an actionviondelete: https://decibel.ni.com/content/docs/DOC-30447

  • Best way to pass the name of the e/s DAQmx channel Veristand 2011 Custom Device?

    I'm building a custom device that will run a DAQmx task on the target of RT.

    I use VS2011 and alsoSimple custom device tool, which, at this point I'm not sure if it can work under VS2011...

    I created the fine libraries and custom device (a PWM input called InputPWM) has added to the Explorer from the system.  Running it returns the following error when I deploy:

    -----------

    LabVIEW: Type VI reference is not part of connector of VI.
    =========================
    NEITHER VeriStand: Open VI reference in Custom Devices Storage.lvlib-> pen device reference (Interface HW) .vi-> Custom Devices Storage.lvlib:Initialize Device (Interface HW) .vi OR VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi-> NI VeriStand Engine.lvlib:VeriStand Machine.vi engine-> Engine.vi NI VeriStand Engine.lvlib:VeriStand-> NI VeriStand Engine.lvlib:VeriStand .vi engine Wrapper (RT)
    c:\NI-rt\VeriStand\Custom Devices\InputPWM\InputPWM Engine.llb\InputPWM RT pilot VI.vi

    ----------------------

    On the console, it says that the error is 1026, LabVIEW: Refernece VI is not valid.

    I suspect that a potential problem is that I used a DAQmx e/s in the Configuration.ctl and the InputPWM RT pilot VI.vi in the framework can not deal with this type. So my questions:

    -What is the easiest way to pass the names of e/s to the custom device? For a quick test, I could go to hard code, but a more generic solution would also. Should be based on the address for the e/s MAX? Do I have to create the ctr under the DAQ hardware in VS?

    - or said by the way, is there a way to review these screw frame to see where the questions is, as you would with LV - RT?

    THX.

    L.

    If you use the tool of easy custom device, just put everything you need inside the cluster configuration data and these data will be in the home page of the custom (for the user to set) device and be available at runtime in the RT device custom code.

    You could have them type the name of the DAQ card and have an array of names for the channels to use. You then create the task running. or something like that. You like.

  • execution of the RT custom device screw driver

    Hi all

    I'm building a custom device in which I expect a user input. (user provides entries on the home page of the custom device).

    Once the entry is expected on this basis I read the file-specific data and creating channels and article.

    Previously creating channels and article I in the initailiazation code.  But now that I'm waiting for user input I can't create these channels during initialization (reason is before getting the input channels will be created which I don't want. My creation of channel depends on the intervention of the user).

    If this logic of formation of channel I now write in pilot RT VI with my main logic of the reading and writing of the channels. For this I just want to know what exactly is the RT pilot VI begins its execution?

    If the RT Vi driver starts to run after adding the deivce custom veristand and after giving the user input and then my purpose will be resolved.

    I hope I explained my question correctly.

    The pilot begins after the definition of the system is deployed.  I don't think you can add strings in VI driver.  Nor do I think that you want, because you won't have an interface for them in the system definition.  Without a channel interface, i.e. mapping, how do you get data in and out of them?  I think your plan to create channels based on user input and data configuration are fine.  I suggest that you implement in the homepage or pages on the main page.

    -Steve K

  • Creation of custom device

    I am trying to create a custom device that makes it easy for a user to configure many digital output channels. My camera is now Initializes in VeriStand without any problem. I have a hierarchical design with a folder "Output Module 1' containing 32 channels. I've added the output Mode (U16) properties and enable State (Boolean) for each channel. The problem is that I don't know how to set the values of these properties in the design of LabView. I tried to use the Set point property VI to write a new value for each property without a bit of luck. I tried different others live too, but none seem to set the value of the property. I get a response to change the values in the "front" page in VeriStand System Explorer, but when I click on a channel to look at properties, nothing has changed.

    I followed step by step custom device guide http://zone.ni.com/reference/en-XX/help/372846J-01/veristandmerge/cust_device_overview/ of OR.

    My hunch is that my lack of familiarity with the node pointers cause me problem. Does anyone have an idea about this problem?

    Hi MitchD319,

    If I understand your question, the following resource should be helpful:

    Adding the element of custom device properties

    http://zone.NI.com/reference/en-XX/help/372846J-01/veristandmerge/adding_cd_properties/

  • Multi-threaded custom device

    Is it possible to create a custom multithreaded device?  I want to create a client-server architecture, somewhat like the http://zone.ni.com/devzone/cda/tut/p/id/3098 example in a custom device.  The only difference would be that I would like to make the series of read/write in the high priority task.

    Thanks for the help!

    -Ryan

    Hi Ryan,

    This should be possible if you use a custom asynchronous device. The curls will then run in their own thread and do not affect the execution of the primary control loop. Make sure that there is enough time sleeping in your loop of high priority. Note, however, that put communication series in the loop of high priority will negatively affect your determinism.

    For more information on the Veristand engine and the custom device types you can choose one, please see the following:

    Understand the VeriStand engine

    Creation of custom devices

  • The value of custom device entry

    Hello

    In fact, I create a custom (asynchronous) device that controls a climate system. It consists in adapting a functional code LabVIEW to create custom device. Unfortunately the LabVIEW code uses a lot of FGVs that act as input and outputs at the same time (this means that the system can change the value of an entry).

    So, I would like to know if there is an easy way to set the value of an entry in the custom device engine code. I tried the following without success:

    • Written in the FIFO of the entrance channel.

    • 'Set channel use value' of the API of NI VeriStand-> I get the error 307970.

    Yes, is there something I can do to facilitate the creation of my custom device? instead of "Rethinking" all the code which is a real pain in the * the complexity of it?

    Thanks in advance.

    Pen

    We solved that by using part of inllne to only update the channel and postponed the real asynchronous threads treatments with exchanges of data through FIFOs.

    ++

  • Adding custom device VS programmatically

    Hey everybody,

    So I was wondering if there is a way to programmatically add a custom to a homeless GUY in VeriStand device.  I have a program that runs through tricks of calibration and after it's done I want to automatically add a device tailored to the Homeless.  So far I found only a way to get an up-to-date list devices custom - cannot add a.

    Does anyone know how to do this?

    Thank you.

    I assume you are using the definition of system .NET API to change the homeless before deployment.

    In this case, there is a constructor for a custom device that takes the GUID of the homepage. Once that is done, use the AddCustomDevicemethod on the node CustomDevices of the Homeless.

    When you have the custom device reference .NET (the object) you can configure it with calls .NET as add channel/section and set properties. Although, given that most of the custom devices have initialization VI who made the most of it, you can call initialization VI, in fact if you want. To do this, get the NodeIDof the CustomDevice object and passing to the initialization of VI connector pane.

    I hope this helps!

  • create an alias for a custom device page

    Is there a way to create an alias for a custom device page?

    I wish that a button on the home page of my device custom (in solution system Explorer) allow the user to create an alias and linking this alias on a channel of the system. My Vi is the following:

    This VI returns the following error:

    "Error 1172 to error creating instance of aliases in the assembly NationalInstruments.VeriStand.SystemDefinitionAPI.Alias, NationalInstruments.VeriStand.SystemDefinitionAPI, Version = 2012.0.1.0, Culture = neutral, PublicKeyToken is a6d690c380daa308, (System.NullReferenceException: determined reference is not set to an instance of an object.).

    Is there a solution?

    Hmmm... good point. You can change my original solution to configure the alias using the basic underlying storage system node type. It should work regardless of the type of channel. As for your second question, custom devices written for 2012 should be recompiled in 2013 of LabVIEW with the support of 2013 VeriStand installed. You don't have to change your code, but you must recompile the LLBs.

    In this workaround, you start by creating an alias that links to nothing. Then, you update the alias to set the DependentNode property, which connects it to the channel. You should not do it this way, but this will work around the original bug.

  • Asynchronous custom device fails to stop

    While I was developing a custom asynchronous device, I came across a problem with the cancellation of the deployment of the .nivsproj I created to test the custom device.

    The custom device would send the error: -307730 Error Message: NI Veristand: one or more asynchronous custom devices did not close correctly and has been abandoned by the Veristand engine.

    I decided to do some troubleshooting for what could be wrong with the custom device by creating a separate custom device using the custom device model. I left completely intact model and it has deployed to our machine pharlap. When I canceled the intact custom asynchronous device it gave me the same error as above.

    I use Labview 2010 Professional version 10.0f2 development system, NI Veristand 2010 for a complete system of development and deployment of the .nivsproj on a licensed machine Pharlap.

    Sorry for the late reply.

    Zach-H by using simple device custom you provided I was able to create a custom asynchronous device that was able to stop. This allowed me to insert instructions printed in the two devices to help out what was causing the unit to raise an error when stopping.

    The culprit seems to be the NI VeriStand - Get loop Type.vi. The type of loop is never defined in the initialization.vi or the main.vi of the device model tool customized. So, when the RT pilot ran VI.vi the Type.vi loop get it would exit always false for the clock of the device to use and never use the correct name of the device clock. Without the name of the unit's clock he would never get a reason for reactivation.

    I forced the vi to use the clock of the device listed in the custom device model tool and I was able to shut down properly.

    TimothyA, you are right about the features of the measuring device. Even with the error of abnormal termination, the meter continues to operate normally after each deployment.

    Thanks for pointing out the problem with no channel being added to the measuring device. I'll make sure the custom device I develop handles the case where no channel, input or output, are added.

    Thanks for the help.

  • Get custom device name of in Sub VI

    Hi all

    I write an error handler that creates log files for any errors and warnings that are generated in a custom device fault.  One of the pieces of information that I would like to include in the file is the name of the custom device the error handler is incorporated in (because I run multiple devices customized in the same project).  I tried various classes of property and refnums different nodes, but I was not able to find something that works.  Is the closest I got to get the name of the VI incorporated in my error handler.  It is of course very little use because of custom device file naming structure are always the same, (the error handler is still in the RT pilot VI).

    If anyone has a method to get the name of the Custom device of in a Sub VI of the custom device, your advice would be greatly appreciated.

    Thank you very much

    GSinMN

    the device point reference is passed into the custom device. If you the wiring in the VI, you will get the custom device name

  • The list of custom device alias

    Hi all

    I'm trying to retrieve the list of aliases of a custom device and generate a file containing the list of aliases and the reference of the chain. I wanted to do before the depoyment of my device custom (for example, during the initialization stage). I have tried different means:

    (1) from the driver of the RT, I get the reference of the target and navigate the tree of thr to get the aliases Section. The problem is, apparently, that you can not get the aliases section. When I call get target Ref, I received the mention of the controller, and then I managed to get the parent (targets)... but I can't get the root node, and then get the alias Section...

    (2) after that that I wanted to use the API to run. I opened a connection to the workspace, call the list of aliases to Vi... But the problem is when I'm in the my custom device initialization stage, it is not started yet, so it returns an error and that you can not deploy

    (3) my last idea was to use the systemDefinitionAPI. But I don't know how to get the path to the custom device system definition file...

    I think that I have run out of idea... If anyone has a suggestion...

    There is a function on the system definition API you can call directly to translate a reference device custom in the definition corresponding system API node type. This type of node, you can navigate to the root and then find all defined aliases.

    The class is called NodeIDUtil. See the example below. Note there is also some other functions to translate the reference point in node types more specific, as a custom device, channels, etc., waveforms. For example, recorded in 2012.

  • custom device PLC Siemens

    Hello

    I do test with NI Veristand HIL. My hardware is a cRIO 9075 siemens AND 200 s PLC. I found an address ethernet/IP add it to veristand:http://zone.ni.com/devzone/cda/epd/p/id/6337

    However, if I understand correctly, it will not work with siemens plc. Are there patterns that I can do on the add-on ethernet/IP, which allows to work on siemens PLCs?

    any help is deeply appreciated.

    Do not confuse Ethernet/IP (Ethernet industrial Protocol) with "Ethernet" (the physical layer, it is built on).  Both Profinet and Ethernet/IP are protocols built on top of the Ethernet physical layer, but apart from that, they are completely different protocols.

    Regarding your question, NI VeriStand consists of a runtime of models yout, IO, etc... and an application for configuring host-side and communicates with the engine.  Generally, the engine will run on a system in time real (for example a CompactRIO or PXI system), but it is also possible to run the engine on your WIndows machine.  The downside to this is that Windows is not a real-time operating system, so you can't wait operation is deterministic, free of jitter, which is usually required by the test of RT applications.

    Insofar as the implementation differences, your target cRIO runs a VxWorks operating system, which is unable to call DLLs.  Instead, you'll have to comile your models in a .out file.  If you use the Mathworks Simulink®, NI VeriStand comes with a .tlc of VxWorks file that can be drawn from the real-time Workshop.  If you compile your own C-base model, you will need to use the chain for VxWorks GNU tools.  You can find instructions on how to do it here.

    If you use the cRIO VeriStand engine, you will need to use a C series Profibus or Profinet module for communication with the controller.  I don't have any experience with these, but you need to program the FPGA and probably write a device customized to interface the NI VeriStand code.  If you use the Windows engine, there may be 3 third-party drivers available for this type of communication that you could then conclude with a custom device.

  • Custom device error VeriStand-307603: no specified main page?

    I get the 307603 error when I try to add a custom device, I developed a VeriStand project on a client computer.  The message error window States:

    «Error 307603 occurred at Custom Devices Storage.lvlib:Initialize New Custom Device.vi > Custom Devices Main Page Data.vi Storage.lvlib:Get.»

    Possible reasons: NI VeriStand: the required custom device doesn't have a specified master page. Contact the creator of custom feature to correct the error. »

    I get this error when you add the device custom VeriStand on my development computer; only on the client computer.  I tried to copy the custom device built on top of the client computer and the custom device of source based on the customer's computer.  I also have three other devices custom that I developed that work fine on the same computer, so I don't know why it does not work.  I checked the specification of the build configuration to ensure that the VI home page is included in the source files, and to generate test preview shows only the custom device LLB and the XML from the file in the build directory, as expected.  The XML file is also oriented the correct path for the homepage VI and the GUID in the XML is the GUID file matches in overall search GUID variable.  I can't think of anything to check.

    Development computer:

    Windows 7, 64-bit

    LabVIEW 2011 SP1

    VeriStand 2011 SP1

    The client computer:

    Windows XP SP3, 32-bit

    LabVIEW 2011 SP1

    VeriStand 2011 SP1

    Everybody knows such a question or give me additional troubleshooting tips?

    I got it to work, but I don't know exactly what the problem was.  I made a copy of the part of the XML file that adds the device custom menu right-click and commented of the original, then edited the part I copied it to give the device custom a different name in the menu.  It worked fine on my development computer at the time I made the change, so I thought it was OK.  I just went and restored the file in the original version and now it works on my customer's computer.

Maybe you are looking for