FPGA in Action Engine

I'm trying to control an FPGA vi from inside an action engine by holding the reference in an USR.  This is not working at all.  Everyting works fine when it is controlled directly on the main vi.  In fact, it appears to have corrupted the main vi, which now crashes LV when run with a "MechFactoryCWrap.cpp" error whenever it is run, even after the FPGA action engine code is deleted.  I'm using FPGA V8 and LV 8.0.1.
TIA,
Bill F

Hi Bill,
I just want to make sure that I am understanding this correctly. You have an FPGA VI that you are trying to control inside an Action Engine. If you don't control it inside the Action Engine, then the main VI works fine. However, if you do try to control it inside the Action Engine, then it causes LabVIEW to crash, producing the cpp error. Is this correct? Also, once that happens, the main VI does not seem to work correctly, right? Does this cpp error occur when you hit the run arrow or when you are editing the VI? Is there a possibility that you could post the VI on the forum or at least a screenshot of it? That might make things a bit clearer.
National Instruments
Applications Engineer

Similar Messages

  • How can I establish an enum typedef for use with state machines and action engines?

    Hey all--
    I have an action engine with several instances.  Any time that I add a method to the engine, I have to modify all of the calling code to update the constant that determines the method being called.  There must be a smarter way to address this problem but my LV experience is insufficient to identify it.  Can any of you wiz-bangs tell me if it is possible to make a type def (I can do this) and use it with each instance of the action engine call so that changing any instance also updates the typedef?
    Thanks.

    Take your enumerator.  If it is not a control (ie constant), change it to a control.
    Under File Menu, select New > Custom Control.
    Move (or copy) your Enum Control to the Custom Control.  Change the Control to Strict Type Def (the selection to the right of the wrench).  Save it.
    (EDIT: ** OOps, the picture shows the wrong one.. sorry**)
    Copy that new Strict Type Def control to your code.
    See images below.
    OR.. If you're using LV8.x, and using a project, I would recomment that you do it from within your project explorer.  Simply insert a new "Control".  The rest of the steps are similar, except that you can insert it from your project. 
    R
    Message Edited by JoeLabView on 07-08-2008 06:47 PM
    Attachments:
    TypeDef.PNG ‏33 KB

  • Community Nugget 4/08/2007 Action Engines

    Action Engines, What are They?
    “An action engine is Ben's term for a functional global which includes extra actions other than just holding the data.”
     (tst , 03-13-2007 01:18 PM)
    In a nut shell tst has nailed it except for the “Ben’s term” part. I was originally exposed to the term "Action Engine"
    by reading the book ""LabVIEW Applications Development A Course on Advanced LabVIEW Programming Techniques*”.  But
    before I get into details of the Action Engine (AE), I will attempt to clarify some terminology.
    Functional Globals
    Functional Globals (FG) are VIs that are functionally equivalent to LabVIEW globals. Functional Globals store
    information. You can read them or write them and that is it. No fancy stuff. Functional Globals are also referred to as
    LV2 globals because LV2 did not have globals but it did support Un-initialized Shift Registers (USRs). The USR is the
    entity that stores the information.
    USR.jpg
    USR’s
    Shift Registers (SR) come in two varieties “Initialized” and “un-initialized”. The presence or absence of a wire
    feeding the SR from outside the loop distinguishes how LabVIEW will implement the SR. If there is NO wire feeding a
    shift register (A), then the SR is not initialized. This is called an “Un-Initialized Shift Register”. The USR variety
    is implemented as static buffer that is re-used from call to call. The values written to the USR in and earlier call
    persist for access (B) in latter calls**. A Functional Global exploits this behavior by implementing two methods of
    interacting with the contents of the USR.
    Functional Global.JPG
    In the “Write” action (not shown) the value of “Numeric in” is placed in the USR. In the “Read” action the contents of
    the USR are returned via Numeric out.
    Action Engines
    An Action Engine (AE) can be thought of as a machine (Engine) that performs some useful task (action) often on
    something (typically but not limited to data in a USR). Functional Globals are very specific type of Action Engine.
    They have two actions “Write” and “Read”. They operate on the data stored in the USR either by replacing or using the
    contents of the USR. So AE’s are a superset of Functional Globals. In many documents the terms AE and FG are
    interchangeable. A recent poll on LAVA has indicated that Functional Global is the most popular term. Since this Nugget
    was prompted by answering the question “what is an AE?” in the remainder of this document you will find that I will
    generally use the term AE.
    Do What to What?
    AE design revolves around the ways the shared resource must be accessed manipulated or monitored. In a Functional
    Global, the actions “Write” and “Read” are appropriate. That is not necessarily the case for AEs. AEs can have entirely
    different set of actions depending on the interaction requirements for the information stored in the USR. A short list
    follows.
     A Configuration AE could allow for multiple processes to share a single copy of the system configuration (in a USR) by
    providing actions like “Set Device ID”, Set Device ON-Line…
    A hardware device can be realized as an AE that presents actions appropriate to the physical phenomenon being measured
    or controlled.
    A DO Port Controller AE could store a reference to the physical device in one SR and the port status in another SR and
    have action like: Set Main Motor On”, “E-Stop”, …
    An Instrument can be implemented to store the device name and settings with actions like “Set Input ON” “Auto-Scale Y”
    and “Get Trace”,…
    Screen Stacks can be implemented by using control references in one USR and maintain a screen view stack in another
    then implementing actions like “Set Config Screen”, “Set Login Screen”, “Back”…
    Users can be managed using an AE with action such as “Add New User” “Set Password”, “Disable User”…
    The list goes on and is limited only by our imagination. Here is an example that shows how a running average can be
    maintained.
    Running_Average_Example.jpg
    Running Average Example
    The Running Average Example shown above shows how a running average can be maintained using an AE. The AE is
    initialized before the While Loop executes. On each iteration of the loop the simulated measurement value (random
    number) is used to update the history of all measurements (Add Number(s)) and the mean is calculated (Calc Mean).
    Please note that although the buffer of all measurements is affected in every step of this example, the buffer (USR in
    the sub-VI) contents are never part of this VI’s diagram. Since the history is stored in the sub-VI, the history can be
    acted on from more than one thread as shown below.
    Parallel_Loops.jpg
    In the parallel Loops Example the history is initialized and then two loops run in parallel with one updating the
    history and the other plotting the average. Since the History resides inside the USR of the sub-VI the two while loops
    are effectively sharing the same block of memory, the block used to store the USR. The Sub-VI was implemented as shown
    in the following sequence of images.
    Init.jpg
    As was the case with Functional Globals, the actions are implemented as a type def’d enum***** driven case structure.
    Appropriate code is present in each case to realize the intended actions. In the “Init” case, contents of “Array in”
    are used to initialize the history. In our example above we did not pass an initial array value. Therefore the “Init”
    resets the history (cleared the array).
    Add Num.JPG
    The operation of the AE when the “Add Number(s)” action is called varies depending on its usage. If the caller passes a
    non-empty array, it is appended to the array. Alternatively, passing a value via the Numeric in” control, and leaving
    the “Array in” un-wired adds a single element to the history. We used the Numeric In input so we were continually
    building our history one value at a time.
    Calc_Mean.JPG
    When the “Calc Mean” action is invoked, the average is calculated and returned.
    This Nugget is continued in the next post
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Solved!
    Go to Solution.

    Nugget continued
    The Traffic Cop Behind the Scenes
    A detail I have not mentioned up until now is that AEs should be implemented as VIs that are not reentrant***. VIs that are not reentrant can only be executing in one context at a time. LabVIEW will ensure that if there is ever a situation were two contexts are attempting to act on the same AE at the same time, LabVIEW will schedule the first and the subsequent will wait until the first call completes. This is similar to a traffic cop preventing more than one vehicle from entering an intersection at the same time. The Traffic Cop is illustrated in the following timing diagram were we look at how the processing of two threads is affected by using a single AE.
    Execution_Timeline.JPG
    In the figure above the processing time of two processes “P1” and “P2” are illustrated by a red or blue solid arrow respectively. In the parallel loops example shown earlier, P1 could be the “Calc Mean” loop and P2 could be the “Add Number(s)” loop.
     t0 - t1
    Both processes are executable and run their assigned tasks. Neither process is accessing the AE.
    t1 – t2
    P2 continues to run while P1 calls the AE. Since the AE is idle it is available to run so P1 continues execution running inside the AE until all work inside the AE completes. The dotted arrow shows that the thread for P1 is executing in the data space allocated for the AE.
    t2 –t3
    At t2 the AE terminates and both process run as in t0 – t1.
    t3 – t4
    This time segment is similar to t1 – t2 with P2 running in the AE.
    t4 – t5
    Similar to t2 – t3 the AE terminates and both process run.
    t5 – t6
    Similar to t1 – t2. P1 take control of the AE.
    t6 - t7
    At t6 P2 attempts to call the AE. Since the AE is not idle it is not available to run. P2 is placed in a resource wait state (it is NOT running) waiting for the resource to become available. The dotted horizontal arrow indicates the process is not executing.
    t7 –t8
    At t7 the call of the AE by P1 that started at t5 completes and P1 continues to execute outside of the AE. When the call by P1 completes the AE becomes available. The process P2 is marked as executable. The scheduler includes P2 in its executable threads and the AE is available. P2 then executes inside the AE until the call completes.
    The Beauty of the AE
    This behavior of a non-reentrant VI is a wonderful feature we can exploit to eliminate race conditions. Race conditions are the nemesis of many a developer. In hardware this was solved with clocked enabled logic. In LV we solve race conditions with Queues, Semaphores, Rendezvous, Occurrences, and Action Engines!AEs can eliminate race conditions when all operations involving updates of the data stored in the USR are done INSIDE the AE. A very simple illustration of how the encapsulation of USR manipulation is shown in the following set of examples.
    Port_With_Global.jpg
    This VI is intended to demonstrate how two bits of an eight-bit port can be used to control the running state of two pumps. To illustrate the control process, one pump will be set running at start-up and then every half second the state of both pumps will be toggled to simulate switching of the supply. This example uses globals and fails miserably.
    Port_With_Global.jpg
    In this example we start out by initializing a global variable so that bit “1” (zero based) is the only bit set in an array of eight bits. This turns on Pump 2 to start. Then the “Port Update” and a “State Change” loops run in parallel. In the “Port Update” loop the state of the port is read from the global and used to update the GUI.
    In the “State Change” loop, the port status is read and the first Boolean is inverted before being written back to the global. Similarly for the second Boolean. Since the read of the globals both occur before the subsequent data processing, one of the threads will be processing old data.
    Port_With_Action_Engine.jpg
    The Action Engine version codes up the same way as the global version but now all of the data manipulation of the port states are encapsulated in the Action Engine  “Port Controller”. This encapsulation ensures all operations involving the data in the USR are forced to happen sequentially even though we did not have to implement any code to achieve this affect.
    The key point to take away from this example is a shared resource (the port status in the case) when implemented as AEs come with resource contention resolution built in provided that all manipulation of the shared resource takes place inside the AE.
    Action Engines to the rescue!
    Action Engines are not a replacement for Queues, Rendezvous and the other synchronization techniques. They are typically called for when your design dictates that a single resource must be shared by more than one parallel process and none of the LabVIEW provided techniques are sufficient. They require a design of their own to ensure they work correctly. They also have to be developed and supported.
    This Nugget is continued in the next post
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Array of variable-length lists in Action Engine

    I'm starting work on a application that consists of multiple sub-panels which each present a specific subset of the hardware functionality.  The hardware appears to the host mostly as memory-mapped registers.  I'm considering implementing the hardware interface in an Action Engine (AE) so that LV will automatically arbitrate among the hardware access requests from the sub-panels and because it (seems to me) to make the data flow more clear than the current implementation that uses a veritable plethora of queues, notifiers, and rendezvous to send requests and results between the sub-panels and the hardware interface at the top-level.
    The challenge is this, though:  Certain hardware addresses need to be modeled in multiple sub-panels -- maybe data at a certain address changes the functionality of some other addresses, or maybe different bit-fields within an address are part of different functional groups.   
    So any of sub-panel can request a read or write to the hardware, but often several of them need to see the resulting data.
    In order to keep the design modular and expandable I don't want to hard-code anything in the hardware AE that is specific to the sub-panels.   Instead, I intend to have the sub-panels "register" with the hardware AE indicating for which addresses they need to receive updates when some hardware address is read or written to.  This means the AE will have to keep the "registration" data in an un-initialized shift-register (USR).  But I want the hardware accesses to run as fast as possible, so I would like to ask for some suggestions how to implement this as efficiently as possible (avoiding, for example, clusters of arrays...)
    I imagine the sub-panel registration info might consist of a user-defined event reference (created inside the sub-panel VI) and a list of hardware addresses that the sub-panel is modeling.   Then when the hardware AE gets a request to read or write at some address it will also generate events to broadcast the data to the sub-panels that have registered for that address.   This will probably include 20-25 subpanels registering for a collective total of about 700 hardware addresses.  
    I'm less concerned about memory than speed.
    So, a few possibilities come to mind for how to implement the registration data in the AE USR:
    A) Have one 2-D array where the array contains one row per hardware address (~320), and columns contain the event refs for all the sub-panels registered for that address.   The width of the array would depend on whichever address has the greatest number of sub-panels registered for it (maybe 4-5?), but that still means the array would be pretty large (about 6.5 kbytes if a reference is a 32-bit value?)
    On the other hand, indexing into this array to look up the sub-panel references for the current address would be relatively quick and easy since the hardware address is the row number.
    B) Have two arrays where the array size is the number of sub-panels:  One 1D array for the registered event refs and one 2-D array for the addresses.  But different sub-panels will have different quantity of addresses registered, so that means the "width" of the address array would be as big as the largest number of addresses registered by one sub-panel (maybe 20?).   This would use a total of only about 1.5 kbytes, but I would have to search through all 25 address arrays to see if the current address is registered.
    C) or, some other way that I have not though of.   
    Once the "registration" data is received from the sub-panels during program initialization it is never changed, only read.   So at first glance it would seem (A) would be the faster implementation.  But I don't know what, if any, performance hit there would be from having such a large array in a USR, which is why I'm asking here.
    Any thoughts or suggestions would be greatly appreciated.
    Thank you and Best Regards,
    -- J.

    JeffBuckles wrote:
    Any thoughts or suggestions would be greatly appreciated.
    Thank you and Best Regards,
    -- J.
    Quick thought (hardly!)...
    I have used a "Self-Addressed Stamped Envelope" architectrure for those type os apps.
    DAQ device has a queue it monitors for subscription requests (Think of a in-box for Marketing deparetment).
    When client is created it submits a request via the queue for the subscription request that included a ref to its update queue and a list of teh channels it wants to watch. The clients then wait for updates.
    The Marketing department pass the request for updates (in-box of marketing department) to the production department (I used an AE to pass the mailing list) who picks through the acquired data and passes updates as requested to all of teh subscribing clients.
    Just sharing ideas,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Action Engine indicators do not update?

    This action engine is part of a larger test. I call it every 15 minutes to test for temperature stabilization (four consecutive readings at 15 minute intervals within three degrees)
    It seems to work as far as detecting stabilization but I don't understand why it's numerical array indicators do not update.
    If you run this by it's self and fill numbers in the Temperatures array control all the indicators work.
    But when it is a sub-vi all the indicators remain grayed out or in their initialized state when I open it while it is running.
    I even have brought the Stab Array out with a terminal thinking it would be updated every time the sub-vi ran, but it is not.
    What is going on here?
    Solved!
    Go to Solution.
    Attachments:
    Check Stab.png ‏50 KB

    It seems to work OK for me.
    Here's what I did:
    Put snippet on block diagram
    Disconnected Function control from Type Def
    Wired controls and indicators to connector pane
    Then I placed the AE in a main program. Being lazy, the main uses a breakpoint to stop each execution of the loop so you can vary the Temperature inputs.
    steve
    Weinberg's Second Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    main.vi ‏10 KB
    AE.vi ‏18 KB

  • Blackberry Desktop Software freezes at message "Action Engine Loading Configurat​ion"

    I have Windows 7 Professional. My Outlook profile is saved on an Exchange server and my Blackberry had previously beeng syncing with Outlook in this setup for nearly a year without issue. 
    Recently, the desktop software freezes at "Action engine loading configuration" message and is unrecoverable. I have tried the following things to rectify the situation:
    1) Adjust the organizer settings not to sync anything except the date & time. Still happens
    2) Delete all data from the device using Desktop Software and try to resync. Same problem
    3) Uninstall and reinstall Blackberry Desktop Software and try to sync with both the original set of data and the empty, deleted data Blackberry. Same problem.
    4) Tried wiping the blackberry completely using JL Cmdr, reinstalling the OS. In this scenario I can sync Addresses but once I sync Calendar the problems happens again and I am unable to ever sync it again (Including thereafter when de-selecting the Calendar option. 
    At this point I have spent hours scouring Google for help and trying the above items. This has been disastrous for me as I rely on the sync'd data for work and have already starting missing things. 
    I don't believe there is anything wrong with the Blackberry, as it works fine and works perfectly well after re-loading a fresh, OS, etc. 
    I have tried playing with the support logs but because the software freezes before calendar can sync, nothing is in the log that states if there is a corrupt record in calender causing this. Nothing dramatically changes in my calendar between the day that syncing worked and the day it didnt.
    I've tried searching the Blackberry forums and have found some info but nothing helpful. RIM does not provide support telephone numbers and AT&T support has continuously demonstrated itself as worthless over my time with them. 
    Is there any resources left at all that I could try to get past this issue, not waste any more time, and be able to resolve the issue?
    Thank you for reading and for any input you are willing to offer.
    Solved!
    Go to Solution.

    I had a Dell PalmPilot type device in 2003 that sync'd contnously with my computer using ActiveSync. I didn't ever have to click Sync, I would make a change on either device and they would sync. 
    The fact that it is 2011 and we still work with Desktop Manager, the biggest piece of **bleep** software I still have to use, is simply pathetic. 

  • First foray in LVOOP mixed with Action Engine functionality, would appreciate comments

    Hello (LVOOP) experts!
    I am a big fan of Action Engines (AEs), and use them very regularly.
    Now, say I wanted to have a Logging module that writes text to a log file, I can create an Action Engine for this and all is well, i.e. I can drop this VI anywhere in my hierachy and it basically just works. I like to encapsulate AE in a lvlib.
    So, what if I wanted a second Logging module, doing exactly the same thing, but operating on a different file. Well, I could create a new copy of the Action Engine in the project, duplicating the code and giving the second AE a different name. This is of course a bit clumsy, as what if I wanted 100 of these!
    I suppose I could make the AE re-entrant (cloned) use VI server to obtain a second copy of the AE, but I have not tried this.
    So what I decided to do is make a LV Class, and just instantiate a second class as needed. I really really really like the ability of AEs to drop them anywhere without wiring all the way through the hierachy, so that was a design goal with my LVOOP implementation. As far as I can tell, one way to do this is using single element named queues (sort of a singleton design pattern).
    The attached code is my attempt, I would really appreciate comments, both positive and negative.
    nrp
    CLA
    Attachments:
    Logger LVOOP.zip ‏54 KB

    tst wrote:
    What you've basically built is a SEQ-based, by-ref class (although you pass a name, not a reference), which is certainly a valid construct. dqGOOP has been doing that for years and the singleton example also uses this, as you mentioned.
    Some comments:
    You really don't need the object as an input. It can be a constant on the diagram.
    You could make this a by-ref system and pass the object which holds the queue reference, similar to the singleton example. This has less chance of braking, IMO.
    Instead of acquiring the queue in each member VI, create an LV2 manager VI - when it gets a name it looks up its reference in an array. If it doesn't find it, it creates a new ref and returns it. If it does find it, it returns it. That simplifies some of the code you have to replicate for every member VI.
    The fact that you have to replicate code at all for member VIs is annoying. It would be great if LVOOP had by-ref support built-in or could at least create data access VIs from a template.
    1. Fixed. I copied this technique from Dr D's Xylophone project. I thought if you drop the class constant on the BD it actually creates a new object each time?
    2. Not sure I get you on this one, could you provide some more enlightenment please.
    3. Done. Probably not the most efficient implementation though...
    4. Agree it sure is annoying!
    New version with basic queue manager attached!
    nrp
    CLA
    Attachments:
    Logger LVOOP v2.zip ‏75 KB

  • Action Engine Data Space associated with an executable

    I am thinking of using an AE (Action Engine) for my project. I have basically 3 top level VI which I use to display and control the machine behavior (they are essentially duplicates of each other). If I invoke the AE (same name), will the AE will be sharing the data with the 3 top level VI in a single executable?

    I have not tried that in LV 8.+ yet so I will speculate.
    Since NI is pretty good about making sure old stuff still works, I suspect you should be OK.
    If not, you will have to explicitly specify the applicaiton instance they run in.
    For all of these types a questions, I stongly urge you "Build early, build often" just to make sure you do not get blind-sided when the dead-line approaches.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Action engine/array question

    Im sure there is an easily corrected mistake I'm making. I am going to be making an action engine where I need elements added to an array, and after the array is full, toss away old data and add the new data. If someone can tell me why this array is continuing to be all zeros i'd appreciate it. Probably misuse or misunderstanding of one of the array functions. If someone could put a photo of the corrected VI rather than attach the actual VI it I'd appreciate it as I wont be on a computer with Labview until Monday. Thanks.
    CLA, LabVIEW Versions 2010-2013
    Solved!
    Go to Solution.
    Attachments:
    actionengine.vi ‏22 KB

    If you could just take a last look at this and make any more comments I'd appreciate it. I'm trying to learn how to do this stuff as efficiently as possible the first time so I don't have to backtrack/relearn. I'll take advice on anything, except tunnel and wiring as I think I can fix that myself. I'm more worried about the actual coding. And yes, I am aware my front panels aren't organized
    Message Edited by for(imstuck) on 01-22-2009 02:59 PM
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    actionengine.vi ‏67 KB
    test_action_engine.vi ‏144 KB

  • Action engine loading configuration...Unknown error reported

    When I try to synchronize with my computer, I get "Unknown error reported" after it attempts the "Action engine loading configuration..."
    I uninstalled and reinstalled the Desktop Manager software, and I was able to synchronize once, but the error reappeared on subsequent attempts. I really don't want to uninstall and reinstall the software every time I want to synchronize.
    I deleted the Intellisync folder and restarted the software and the computer, but this did not solve the problem.
    Please help!

    Try deleting the Intellisync folder and then synching again to see if you still get the error
    http://www.blackberry.com/btsc/KB11703
    You can also try performing a clean uninstall of the Desktop Manager. Then installing it again.
    http://www.blackberry.com/btsc/KB02206
    If someone has been helpful please consider giving them kudos by clicking the star to the left of their post.
    Remember to resolve your thread by clicking Accepted Solution.

  • Differenza fra FPGA e Scan Engine in RealTime

    salve a tutti, ho seguito un corso real time per labview dove ci facevano programmare l'accensione, monitoraggio, raccolta dati e spegnimento di una specie di camera climatica composta da una ventola e una lampadina. è stato tutto molto chiaro ma c'è un problema: tutto è stato fatto col supporto di scan engine.
    invece io dovrei programmare un motore passo passo in real time con cRio e col modulo NI 9501 che non supporta lo scan engine e quindi bisogna programmare con l'FPGA.
    qualcuno che magari ha avuto esperienza col modulo 9501 sa dirmi cosa si intende col "programmare con l FPGA" e come bisogna fare?
    perchè avendo seguito il corso con lo scan engine ho capito come si usa lo scan engine, i controlli e le variabili della lampadina e della ventola venivano fuori automaticamente.
    mentre con l FPGA come si programmano i controlli ( in questo caso accensione spegnimento senso di rotazione e angolo di rotazione del motore ) da mettere nel block diagram?
    insomma quale è la differenza fra scan engine e FPGA?
    qualcuno può aiutarmi? 
    grazie 

    grazie per la risposta, il link che mi hai dato è molto utile. da quello che mi avevano detto al corso in teoria non è necessario che io apprenda totalmente la programmazione con FPGA perchè per quanto riguarda la mia applicazione, l'FPGA serve solo nel VI iniziale per i controlli del motore e poi si può programmare tutto normalmente con labview real time. in pratica mi avevano consigliato questi due VI che ti allego relativi al NI 9501 che sono programmati con l FPGA, e di usarli come "subVI" in un programma labview real time normale. quindi da quello che ho capito la parte FPGA sarebbe già fatta da questi due esempi. è possibile o ho capito male io?
    inoltre ho provato a dargli una occhiata ma non li capisco. questi programmi effettivamente cosa fanno?
    grazie
    Allegati:
    Setpoint Control (open loop) - NI 9501.lvproj ‏22 KB
    Setpoint Control (open loop) - NI 9501 (FPGA).vi ‏106 KB
    Velocity Control (open loop) - NI 9501.lvproj ‏25 KB

  • Parallel instances using ONE Action Engine

    Hi Everyone.
    I just wanted to see what type of ideas this would bring to this issue.
    I have an AE that holds all the pointers (or referances) that 20 instances of a reentrantVI use in parallel. Obviously the issue is the execution speed as all the instances are waiting to read the AE (and probably a heap of other issues I haven't ecountered yet). 
    I have placed an example of the AE that I am using where I also show HOW I'm using it on a bigger picture.
    Please DO NOT RUN the example, just open it and see the BD, it is where I tried to put all the information on and it was the best way that I can think of to explain the issue.
    Kas
    Solved!
    Go to Solution.
    Attachments:
    Example.zip ‏63 KB

    johnsold wrote:
    1. Are items 1 and 2 in Example.vi or the image guaranteed to run before 3 and 4 start? Or, can segments be added while the proceesing is occurring?
    2. How do the changes made by item 4 affect the data not yet processed by item 3?  How do they affect segments already processed?
    3. The only value on FGV.vi Segment: Out which is meaningful is the last one. The compiler is probably smart enough to not update it on earlier iterations but there might be a small speed improvement to moving the terminal outside the for loop.
    4. When are the Get Segments and Get Items commands used?
    5. Could a parallelized for loop do what you want rather than multiple reentrant VIs?
    Ok, sorry for not properly explaining things. My explanation of My problem made sence in my head so I thought every one else will get it .
    1. Items 1 and 2 are sequential, so guaranteed to run before 3 and 4. However, when 3 (the reentrant) is executed and sudenly gets an error (i.e. TCP TimeOut 56) then the segment function that was initialy changed to "in process" when taken out (before the timeout happened) is set again to "waiting" so that untill the error gets sorted, another reentrant can get the segment and does something with it. Also, if the reentrant in step 3 is executed and there are no errors then the output data is sent to item 4, which sets the function of the segment in AE to either "Damaged" or "Missing". This is happening while all the other reentrant VIs (in item 3) are still running.
    2. Item 4 will ONLY make changes to the function of the segment AFTER item 3 has done something to it, and not before. And NO, after step 2 on my description, no Segments can be ADDED or DELETED. Only the segment Function changes. Based on this function, the segment is read. So, if the function says "waiting" then the data is sent out, otherwise, the reentrant VI thinks that all the segments are processed and so it exits (I do this through a "5003" error inside the AE). 
    3. Ummm.. Maybe the compiler does what you say it does (no idea here) but I doubt it will give me any improvement that would make a difference to me.
    4. They are used in my step 3 "Get segment" used ONCE (If no error) and TWICE (if error), "Get Items" used ONCE (if no error).
    5. Won't make a difference, since the "Choke Point" is the AE. How you launch the VI won't make a difference. 
    Kas

  • Reproducible Long Standing Glitch (Actions or Color Engine?)

    I have a way to reproduce a serious Photoshop problem:
    Quite a long time ago I created a simple little action that allows me to create a new document and paste in the contents of the clipboard in one easy motion.  I assigned a function key to it so it makes it very easy for me to start a Photoshop editing session on an image in my clipboard.
    This always works fine with RGB images, which comprise the lion's share of what I work with.  However, occasionally I'll have a grayscale image in my clipboard and I'll try to use this action, and this causes Photoshop to fail in various ways, sometimes with error messages implying Adobe Color Engine problems, and sometimes locking it up entirely.
    Chris Cox:  Perhaps your being able to reproduce this problem as listed below can help you find and fix a difficult bug.
    The following is the source for the action.  You can download it from here.
    Action: New Image from Clipboard
      Make
       New: document
       Preset:  “Clipboard”
      Paste
       Anti-alias: none
      Merge Layers
      Select Current History State
      Make snapshot
       From: Current History State
       Name:  “New”
       Using: full document
       With replace existing
      Select snapshot “New”
      Set History Brush Source
       To: Current History State
      Clear History States of current document
    Here's how to reproduce the problem:
    1.  Load the above "New Image from Clipboard" action into your Actions palette.
    2.  Create a simple Grayscale image via File - New:
    3.  Using the gradient tool, render a gradient across the image (I'm not sure this is necessary for the bug, but it helps you to see if the image is handled correctly in a later step).
    4.  Select - All, then Edit - Copy.
    5.  Now do File - New and create an RGB color image:
    6.  Run my "New Image from Clipboard" action.
    7.  If the step above completes, Try to paint something on the grayscale image if possible with the paintbrush.
    After step 6 sometimes I'll see no image or a transparent background (as though the screen didn't update fully), sometimes a message will be emitted implying the grayscale image is being pasted into a color image.  Photoshop may lock up.  Sometimes it will actually appear to work, then step 7 will fail with an error message implying there's a problem with the Adobe Color Engine.
    I can reproduce this problem at will with recent versions of Photoshop, though sometimes (rarely) it takes a few tries.
    The weird part is that it will work fine if I go through the steps interactively.  Only when being run as an action on a grayscale image does it fail, and not always in the same way.
    Just a wild guess, but since it seems to have to do with working with a color image in the interim, I'm thinking the actions engine in the File - New step is referencing uninitialized storage somewhere.
    -Noel

    Thanks, guys!  Good luck with the fix.  Even one less time accidentally having Photoshop go south when I'm creating a new image will be a blessing!
    -Noel

  • Change value of a typedef in parallels to another running action

    Hello,
    Well, I have a problem with my VI.
    To summarize I use a Vi « IdsVg.vi » to achieve some measurements process.
    This one uses an action engine as a sub-vi to store data of the front panel and to precede complementary actions. The front panel is a strict typedef…
    I programmed the Vi avoiding to use sequence structures in order to be able to do other actions on the front panel in parallels. Nevertheless I’m running out of ideas for solving my problem.
    The problem:
    I would like to change values (time constant, Boolean of graph) of the front panel at any instant when the main vi is running. The actual problem is: when I start the program, using register event I can change values of the front panel, but when the program is running the while loop in which it gets the measurement, it isn’t possible to change parameter of the front panel…  
    Is there a solution or a trick??
    Thank you for help
    Attachments:
    MyProblem.lvproj ‏10 KB

    Putting in the project file does not help much, good try though. The actual files are missing though, so nothing shows up.
    I suggest you create a separate producer consumer loop in your main vi. The vi retrieving the data could pass the relevant data (producer) and the consumer loop will then process the data and update the fron tpannel. Note, only the producer consumer loop will update the front pannel.
    You would not need a sequence structure to control the update. The producer consumer loop will only execute when you provide the necessary data.

  • Can't run plugin with action. Please help....

    Hi gang, for years I used Tiffen DFX plugin and would use it (and other plugins) in a custom action to batch process a folder of images. When I upgraded from CC to CC2014, I lost that ability with DFX. My other plugins work just fine using an action but DFX does not work. I have a rapport with Tiffen and they cannot replicate the problem so they are not much help. Has anyone ever had an issue where the action would not let the plugin do it's job?
    Here's my workflow.....
    I open a test picture in PS and click the record action button. Then I'll record this custom action using several plugins one of which is Tiffen DFX. Once I'm done adjusting the image, I will stop the action from recording.
    Then, in Bridge, I'll navigate to a folder of images, select them all then go to: Tools > Photoshop > Image Processor and I'll make sure that "Run Action" is selected and click "run". The processing takes place including the custom action and everything is fine except that my DFX effect doesn't show. For some reason, I cannot use DFX with an action even though I've done this for the last few years with no problem.
    I'm wondering if any of you have any idea what may be causing this? Tiffen cannot figure it out so I thought I would head over here and see if you guys can.
    I'm running PS CC 2014 on Mac Pro system w/OSX 10.9.4
    Thanks!!!

    That sounds like a very specific problem in the plug-in itself, possibly in the part of the code that sends the processed image data back to Photoshop through the use of the gFilterRecord->advanceState() call.
    Unless somehow you have made a very basic error, such as having a selection somewhere else or are on the wrong layer, I think you're going to have to pursue this further with the Tiffen folks.  There's no reason you should see it fail like this.
    One other thing...  Does it make a difference if you have the document docked as a tab vs. in a floating window?  If you have one window open vs. many?  I ask because there was a time not too many versions ago where the actions engine in Photoshop wasn't handling the windowing properly, and a workaround was to use Tabbed view.  This is a longshot, but I figured I should mention it.
    -Noel

Maybe you are looking for