Custom device FIFO questions

Question again about custom device.
If there are 200 output channels but every 100ms only 40 of them get updated by the driver.
Is it possible to write only those 40 channel data to the device output FIFO at a time?
What is the RT FIFO write speed when writing 200 channel data at a time?
Thanks.
Solved!
Go to Solution.

If your custom device is an inline custom device you may update only dedicated channels per iteration.
In case of a asynchronous (parallel) custom device, you are forced to write always the entire stack of channels no matter what happend to the values. (if none of the values have changed, then it is ok to not call the FIFO Write function).
The FIFO Write doesn't cause a huge overhead.
You can easily benchmark that yourself though.
Tom
http://www.newgistics.com

Similar Messages

  • Accessing custom device FIFO array element by name

    Hi,
    Some of my custom devices have a large number if I/Os. Because the FIFOs are arrays, my custom device RT driver VI has been referencing them by indexing the arrays. Is there a recommended method to reference FIFO I/Os by name, and preferably the same name as the channel names that are created by the initialization VI? Referencing array elements by index can get very confusing and not very flexible if I need to add or remove custom device I/Os. Thanks.

    You could use an enum diagram constant to wire to the index terminal of index array. Make the item name correspond to the element name.
    LabVIEW Champion . Do more with less code and in less time .

  • More questions on asynchronous custom device

    I am trying to create an asynchronous custom device for VeriStand and have the following questions:
    a) At what rate is input channel being scanned and data pushed into the input FIFO of the custom device? Is the scan rate affected by whether the input channel is mapped to a Workspace control object or whether it is mapped to a simulation model (.dll file)  output?
    b) At what rate is the asynchronous custome device real-time VI being executed? Is it at the same rate as the primary control loop rate? Can I change the execution rate of a custom device and how?
    c) I have a quad-core PXI real-time platform. How can I assign the custom device to a specific processor, like what you do with a simulation model (.dll file) in the system definition file?
    Thank you in advance.
    Solved!
    Go to Solution.

    Data FIFO
    The rate at which data is pumped to your Custom Device is static, and has nothing to do with whether the Workspace is connected, or whether a model is mapped to any of your channels. By default, data is pushed into your Custom Device's input FIFO every iteration of the Primary Control Loop. If the FIFO is full, the oldest data packet will be overwritten. Also, by default your outputs FIFO is checked ever iteration of the Primary Control Loop. You can, however, use the function NI VeriStand - Set Custom Device Decimation to tag a property on your custom device that will indicate to the system its expected decimation. If you set a decimation of 10, for example, the Primary Control Loop will only send new data every 10 iterations and only check for new data from your outputs FIFO every 10 iterations. This can help reduce the CPU load of your system if you don't need updates that often.
    Similarly, you can use the function NI VeriStand - Set FIFO Depth to control the FIFO depths of your inputs and outputs FIFO respectively. By default both have depth 1.
    Execution Rate
    The rate at which your Custom Device executes depends entirely on how you set it up. You can, for instance, have your asynchronous Custom Device use its own timing and run at a completely independent rate from the system. Your VI could have a regular while loop with a 10ms timer in it, for instance, or it could be based off some hardware device timing.
    You can also choose to tightly synchronize yourself with the Primary Control Loop. You do this by registering using a property that your Custom Device has a Timed Loop that will use the Device Clock. The Device Clock is a timing source that is ticked every iteration of the Primary Control Loop after Custom Device FIFOs have been updated. You register for this simply by calling the property NI VeriStand - Set Loop Type and specifying Timed Loop for loop type and Use Device Clock to be True. Then, as the template VI does, just wire the Device Clock into your timing source input for the Timed Loop. If you have specified a decimation factor, as mentioned above, you should probably also use this factor as your dt. This means if you have a decimation of 10, you should only execute your Timed Loop every 10 ticks of the Device Clock timing source.
    Another easy way to synchronize yourself tightly with the Primary Control Loop with little hassle is to simply base your timing off the availability of new data in your Inputs or Outputs FIFO. To do this, you could just use a regular while loop, and then just wire -1 to the FIFO timeouts. Then your Custom Device will run as fast as data is being produced and consumed by the system.
    Specifying a Processor
    There is no built-in property for processor assignment, but it will be very easy for you to implement this yourself. You can specify the Processor to execute on in System Explorer by creating a custom property using NI VeriStand - Set Item Property. For instance, you could set an I32 property called "Processor", with -2 meaning auto-assign, and any non-negative value indicating a specific processor index. Set this property in one of your Custom Device configuration pages in System Explorer and then read the property in the Driver VI in the engine using NI VeriStand - Get Item Property. Then just wire the property value to the processor affinity input on your Timed Loop. You should, however, always check that that processor exists on the target. Otherwise the Timed Loop will report an error and abort. This is exactly what we do for models internally.
    Jarrod S.
    National Instruments

  • Custom device / I am trying to use a vehicle controller model developed in LabVIEW with compactRIO (cRIO-9024)

    Now I have developed a vehile controller model with LabVIEW so as to run on VxWorks operating system. ( compactRIO cRIO-9024)
    And I converted a controller model of labview into *.lvmodel in order to use it as I did with simulink models. 
    However, converted *.lvmodel was not supported for VxWorks operating system. so after searching for this, I found out that I have to use a custom device. 
    I am now studying the custom device, but it looks diffcult because I dont have much experience in real-time system.
    Here are my questions.
    1. Simulation model in VeriStand
    Should I convert a labview controller model into *.lvmodel even if I use the custom device in order to run on VxWorks operating system? 
    If not, what should I do after building a controller model with labview?
    2. Operating system
    It is silly question. anyway, as long as I run a controller model on compactRIO cRIO-9024, the operating system always has to be set to VxWorks. Is it right?
    3. Custom device
    This is the most difficult thing. I dont know even what to do. What functions should be inside a custom device template tool? The controller model send output signals to a vehicle model, and receive input signals from a vehicle model.
    Thank you in advance. 
    Hognjun

    Hi,
    You should post this on the Veristand Forum.
    http://forums.ni.com/t5/NI-VeriStand/bd-p/440
    Ravi

  • Running unit tests on inline hardware custom device

    How to do unit tests for Inline Hardware Custom Devices?
    I get this error after creating a unit test.
    Possible reason(s):
    Cannot connect to the target. Please ensure that the VI Server setting is enabled and deployed to the target. Also, make sure that the port number is correct and that this machine is allowed to connect through VI Server.

    wegunterjrASI, 
    I have a few follow up questions for you to gain a better understanding of your application: 
    1). What are you using to do the unit test (NI’s unit test framework or VI tester from JKI)?
    2). What are you conducting the unit test on (RT Driver or something on the host machine)? 
    3). Are the unit test VIs under the target in the LabVIEW project? 
    4). Are you able to run a simple unit test? 
    Screenshots are always appreciated. 
    Regards, 
     

  • Calling Main and Extra Pages of Custom Device(s) from LabVIEW

    Hi,
    I am currently evaluating VeriStand (VeriStand 2011) and its control from LabVIEW using .NET APIs.
    I am trying to use LabVIEW to add and configure custom devices for a given system definition file.
    For that I am using a subpanel, the same way it is done in the System Explorer.
    It is almost working.
    I only get errors from VIs that are dynamically called from the Custom Devices API. These VI's are part of an lvlib which is called "Custom Devices Storage.lvlib".
    I can't find this lvlib on my Computer. So, I guess, this error is normal. The only way to get rid of this error would be to load this lvlib in memory, but how ?
    An example of a dynamically loaded VI from the Custom Device API :
    If I can't configure a Custom Device inside my own Human Man Interface, there is no way I use VeriStand in the future. I don't wan't an operator or an administrator to open the System Explorer and change anything else than Custom Devices that may change in several of our test benches.
    Is there a way to do that or should I throw VeriStand to the trashcan ?
    Thanks in advance for your answer(s).
    Regards,
     

    Hi DaHelmut,
    First of all, I apologize for the lack of applicable replies. What you're attempting isn't something we usually encounter so our team didn't quite understand.
    I'll restate what you want to make sure its clear: You want to make your own version of system explorer fir your team to edit system definitions with. You also want it to support configuring custom devices. Therefore, you need custom devices to work inside your system explorer just like they do inside the shipping system explorer.
    This is technically possible, and I will help you accomplish this with some advice, however I have never seen this done before so it might take us a while to figure out all the issues. Typically people developing a custom GUI for a test bench just use the system definition API directly instead of using custom device's as-is... which is more difficult, and I agree your approach is better if it works. However, most test benches have a known set of custom devices (maybe just XCP/CCP and scan engine) so they only need to use the system definition API for maybe a few custom devices... not any device.
    First things I should mention:
    Editing a system definition, either through your custom gui and therefore through the system definition API, or through the system explorer... always requires a PC or Full development license. An operator licenses will never be able to edit system definitions no matter what.
    There is a set of VIs provided by the ECUMC toolkit to add/remove/edit system definitions with the XCP/CCP custom device. You would have to put your own GUI on top, but the VIs are installed here: <\LabVIEW>\vi.lib\ECUMC\NIVS
    I have an unreleased set of VIs that do the same thing for the scan engine and ethercat custom device I can provide
    If you still want to create your own system explorer thats capable of loading and configuring any custom device, here are some suggestions:
    Custom devices are built into LLBs that include all of their dependencies, so they can be loaded by the LabVIEW run time engine. If you create a VI that loads custom device's, you should be careful to avoid cross linking corrupting your development system or your custom device's. For example your system explorer might use "Get File Extension.vi" from vi.lib, but the custom device you're loading might also use this VI and therefore its linked to a copy inside its LLB. You will know when cross linking happens when the LabVIEW load warning dialog appears saying "vi X loaded vi Y from Z instead of A". If that happens, do not save. To avoid this entirely, it might be easiest to test your system explorer only as a compiled exe.
    As you saw, some custom device API VIs used by custom device developers make dynamic VI calls to an in-memory library named "Custom Device Storage.lvlib". Since this library is part of the shipping system explorer.exe source, these dynamic calls will error when not run inside the shipping system explorer.exe. There are two types that must be handled separately.
    Some custom device APIs like "NI VeriStand - Signal When Ready for Shutdown.vi" just make this dynamic call, and will simply return an error. These are mostly system explorer GUI specific custom device APIs. To avoid this error, you must create and bring this VI into memory yourself. So create that library and the stub VIs you need, then place static VI references to those stub VIs on your custom system explorer's block diagram. That will bring them into memory so when the custom device VIs try to dynamically call them, it will not error.
    Most custom device APIs like "NI VeriStand - Get Item Description.vi" make the dynamic call and instead of simply erroring, they will instead catch the error and switch to using a .NET implementation of the API call. I advise looking at the block diagram of this VI and then the corresponding offline API VIs to better understand this redirect system. Unfortunately, this redirection gets the offline API VI path relative to vi.lib which doesn't exist for exe's. So when you build your custom system explorer into an exe, you will need to place the "NI VeriStand\Custom Device Offline API" folder adjacent to the exe with these VIs for them to be found because the "vi library" primitive returns the exe's directory when inside an exe
    Let me know if that helps or if you have questions.
     

  • Execution of RT driver VIs in custom device

    Hi All
    I am building a custom device wherein I am expecting some user input.( user provides input on the main page of the custom device).
    Once the input is provided , based on it i am reading specific data from file and creating channels and section.
    Previously creation of channels and section i was doing in initailiazation code.  But now As i am expecting user input i cannot create those channels in initialization(reason is before getting input channels will be created which i dont want. My channel creation depends on the user input ).
    So this channel creation logic I am now writing in RT driver VI along with my main logic of reading and writing of channels. For this I just want to know when does exactly RT driver VI starts its execution ?
    If the RT driver Vi starts execution after adding custom deivce in veristand and after giving the user input then my purpose will be solved.
    I hope i have explained my question correctly.
    Solved!
    Go to Solution.

    The driver starts after the system definition is deployed.  I don't think you can add channels in the driver VI.  Nor do I think you want to, because you won't have an interface to them in the system definition.  Without an interface to the channels, i.e. mapping, how will you get data into and out of them?  I think your plan to create channels based on user input and config data is fine.  I suggest you implement in the main page or in custom pages under the main page.
    -Steve K

  • Device collections question

    I have created a custom Device ollection called test group, I also have added workstations to it. My question is (I cant remember anymore) is how to add another computer to that custom collection.
    MSB

    Hi,
    Have you seen this:
    Import Computer to Configuration Manager 2007 / 2012
    http://www.david-obrien.de/?p=413
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Easy Custom device tool - how to get actual waveforms or data from a channel

    I want to use a custom device to do the simulation for my system, but I am not sure how to get channel data to it?  I am using a cRio 9024, and 6 modules for signal input and signal output.  I did the walk through, but it is not connecting to channel data.  Any thoughts?
    Attachments:
    Add.zip ‏164 KB

    Sorry that my previous response was so brief - I didn't have the opportunity to take a look at your code last Friday (and on top of that, I poorly worded my question about running your code in LabVIEW).
    You would want to include logic to communicate with your cRIO in the Execute VI - you don't need to add anything to the Channel Data or System Data controls to get the data into your custom device. If you're using the Scan Engine, this would mean just dragging and dropping Scan Engine IO variables into the Execute VI and then operating on the data you read out of them. Now, if you want to pass data out of the custom device to other parts of VeriStand, you would need to add items to Channel Data for each value you want to pass out of the custom device.
    When I mentioned running your code in LabVIEW, the idea I was trying to get at is creating a separate test project to verify that the logic you have implemented in your Execute VI works apart from the custom device architecture. Now that I've had a chance to take a look at your code, I see that the logic to communicate with the cRIO hasn't been implemented yet. As such, that original suggestion doesn't make sense - sorry for the confusion.
    Also, just so you're aware, you'll need to modify your custom device project to allow the custom device to be compiled for a VxWorks target. To do so, add your cRIO to the project as a new target and then copy all of your custom device files to the cRIO controller. You'll also need to make some modifications to the build specification to get everything to compile correctly.
    Finally, I also notice that in your init VI, you don't pass a file path to the Open/Create/Replace file VI, which will likely cause some problems when you try to run the device.
    Regards,
    Ryan K.

  • Custom Flashplayer embed questions

    I am currently working on a custom flash player. After
    working on several working versions where I simply used
    actionscript to delegate the actions of my custom player.
    I am now working on a more dynamic ready flashplayer that
    will need to be embeddable. Should I make a .swf specificaly for
    the player using the flash player SkinFLA examples as an outline?
    The idea is to have a player that embeds like youtube, any
    suggestions or tutorials to look over? Also, this player needs to
    have playlist functionality, but it needs to be able to scope to
    anyone. I could have users register and then create an XML that
    references their playlist, but it seems like there may be better
    options. Just looking for some discussion and debate over player
    best-practices....

    If your custom device is an inline custom device you may update only dedicated channels per iteration.
    In case of a asynchronous (parallel) custom device, you are forced to write always the entire stack of channels no matter what happend to the values. (if none of the values have changed, then it is ok to not call the FIFO Write function).
    The FIFO Write doesn't cause a huge overhead.
    You can easily benchmark that yourself though.
    Tom
    http://www.newgistics.com

  • Using Set Cursor Busy in Veristand Custom Device Page

    I am writing a Custom Device in Veristand and tried using the Set Busy vi to disable the cursor while I am doing some tasks on a System Explorer page.  It seems like the Set and Unset Busy vi do not work inside of the System Explorer environment.  I see that NI provides a way to release the cursor with the Veristand API but I do not see a way to set it busy with in the API.
    Am I correct in saying these cursor VIs don't work the way they would in a normal application? Or is there a work around here that I am missing?
    Thanks.
    Rob
    Solved!
    Go to Solution.

    Hello,
    The idea is good, it works for me if you open a reference to System Explorer.lvlibystem Explorer.vi (VeriStand 2012) :
    Best regards,
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  

  • How can I use Easy Custom Device Tool to do the same thing LabVIEW the Basic Averaged DC-RMS VI does

    I am using a cRio 9024 and am reading PWM with a 9205 analog input card.  It was suggested that I use the Basic Averaged DC-RMS VI to convert the PWM signal voltage into an analog signal (RMS value) for use in my system.  The issue is that the 9024 cannot use LabVIEW models (it is VxWorks). I am working through the Easy Custom Device Tool, and wonder if someone can guide me in the right direction.
    Solved!
    Go to Solution.

    Hello,
    Can you give more details about your VeriStand configuration ? Are you using the Scan Interface (and thus the Scan Engine Custom Device) or are you using the FPGA of your cRIO chassis to access the I/O ?
    If you are programming the FPGA and using a FPGA Personalty in VeriStand you can probably add the calculations such as RMS to the FPGA code directly.
    If you are using the Scan Engine, you will need a custom device. The Easy Custom  Device Tool is just a tool, you will need to know more about what a custom device is and how to develop one:
    - http://www.ni.com/white-paper/12712/en/
    Regards
    Eric M. - Application Engineering Specialist
    Certified LabVIEW Architect
    Certified LabWindows™/CVI Developer

  • Deploy modbus I/O server as part of custom device build

    Hello,
    We are attempting to get Modbus up and running as a custom device. From Labview we have managed to get modbus communication working by using Modbus IO servers.
    When I package this with the custom device build we get the following error code when reading the bound variable:
    (0x8BBB0005)
    General Description: 
    LabVIEW: Unable to locate variable in the Shared Variable Engine. Deployment of this variable may have failed.
    I am starting to worry if it is even possible to deploy the Modbus IO server together with the custom device? Any suggestions for other approaches?
    Best regards,
    Jørgen

    Thanks for your replies. 
    The Network Variable Engine is activated on the RT target. 
    I now tried to create programmatically the modbus IO server by using the Express VI. This, however, will not allow me to deploy the system definition file, as it reports that it is missing a .vi. 
    I have then tried to convert it to a regular .vi and bundle it with both the configuration and engine build specs, but the same message appears. 
    Am I misunderstanding how the .vi dependencies are managed by the build specifications? Or do I have to use something else than the express .vi to create the modbus IO.
    Best Regards,
    Jørgen
    EDIT: Added the error message: 
    The VeriStand Gateway encountered an error while deploying the System Definition file.
    Details:
    Error 1003 occurred at Project Window.lvlibroject Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi
    Possible reason(s):
    LabVIEW: The VI is not executable. This error may occur because the VI is either broken or contains a subVI that LabVIEW cannot locate. Select File>>Open to open the VI and verify that you can run it.
    As soon as I remove the usage of the express.vi, it deploys just fine.

  • PXI-6624 custom device

    Hello,
    Sorry for my bad english.
    I start with the custom device.
    I want use two PXI-6624 with Veristand for counter I/O.
    So I try to creat two easy custom device, one for each card.
    The program is ok in Labview, the Configuraton/Engine build too. I can interget it, in Veristand without problems.
    The target deployment is well but I don't see anything in output with an osciloscop.
    I think it's because of the connection beetween the PXI and the device.
    You can find, in attached files, the program for one of the two card.
    It's the more simple of the two device, just two input and two ouput.
    Thank for your advice

    Hello HervéM,
    Unfortunately there is no attachment.
    Could you spot below the files you wanted to attach ?
    Regards,
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Pulling list of machines under the Customized device Collection

    Hi Guys,
    I have created a customized Device collection - "All Laptops" there are some 300+ laptop machines listed, i can see those machines when i do Right Click --> Show Members
    I need to submit the list of machine to my manager, How can get the list of machines in a Report format or an excel format
    Please assist.
    Cheers,

    Also in the console open up the collection so you see all the computers..
    Hit CTRL+A to select all of them
    Hit CTRL+C to copy
    Open up excel, select cell A1, CTRL+V will put them in Excel.

Maybe you are looking for

  • Actual Time bar for the activity duration in Gantt Chart

    Hi all, The Actual time bar for the elapsed activity duration in Gantt chart is not appearing. The same is true for all the activities i.e. activities which are not yet confirmed and activities which are partially confirmed. Is there any customizing

  • 32 bit HDR panorama .tiff editable in Camera Raw???

    I recently did a photoshoot with a car. It was the first time that I planned to professionally use 32 bit HDR merging. I shot 4 exposures of the front of the car from the side, and shot another 4 at the same brackets of the back of the car while moun

  • Can I use "Delete button" in intaractive form?

    Hello Expert. Please tell me the phenomenon of interactive form in Performance Management(MbO or OSA) . I use "off line" solution. Now our customer would like to delete button as delete some objectives who does not entry any comment. Can I use this d

  • Weblogic server log files !! can i read them through HTTP using browser ?

    hi all i wonder if i can configure weblogic server or use a utility to read my log files in application,i need something like log file browsing in oracle webcenter content . any advise ? thanks Edited by: hsweiss on Jul 18, 2012 9:28 AM

  • Code Samples??

    Ross - it's been over a monthsince any sample code has been posted. I know you guys are all about pushing professional services, but many times that is not an option, nor should it be, and we are sitting here stuck because the documentation is so poo