Jump to content

Norm Kirchner

NI
  • Posts

    823
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by Norm Kirchner

  1. Leave it to the RF guy to whip out the DSP.

    The easy way to compare the phase of two sinusoid of the same frequency. 

    Multiply the signal by another sine of the same frequency at 0deg phase and in parallel multiply it by another sine of same frequency at 90deg phase. Take the average of both of those signal into a re/im to polar, snag out the phase value and convert to degrees. 

    Do that to the other signal as well and find the difference between the signals 

    That is the easiest way to get what you want and is very immune to noise. 

    I'm about to board a plane otherwise I'd attach the example. 

  2. I heard a wise man say once, regarding your exact question.

    You should ask for generic VIs, or XNodes   :D .

     

    Okay but seriously the options today are to use polymorphic VIs, where you write your code to work on each type of array you expect, and have it auto pick the right one based on the type wired to it, or you work with variants and expect the user to convert the variant back into the array of their type that they put in.  LabVIEW is a strictly typed language, and there is no easy way to do what you want in a scalable way.

     

    For examples look at OpenG.  Their array tools work with multiple data types because of polymorphc VIs, but if you give it an array of a type def there isn't a VI for, it uses the array as a variant and you need to convert the variant back into the data type you gave it.

     

    A very experimental, not official technology is XNodes which NI uses to accomplish something like this.  If NI ever officially releases XNodes I would recommend you use them, until then you're stuck with variants, and polymorphic VIs.  Here is an example of taking the OpenG array tools and turning them into XNodes which accept any array data type.  Again, not recommended yet.

     

    In short, we as G developers can not make our own functions that act excatly like the array primitives in LabVIEW.

    This techniques listed above by Hoova are the ones to focus on if you want that same kind of behavior.

     

    I vaguely recall that someone once made a tool which would make the poly VI stack for you, for all available data types; this way you don't have to replicate your VI over and over and make the poly.

    But I can not recall where that would be. Maybe someone else could chime in

  3. Let's get a list of who's presenting what at NIWeek so that we don't have to rifle through the agenda to figure out whats actually worth going to!!!

     

    I've got 2 on alliance day (Monday)

    • He Chose.....Wisely; Picking the right RF Software for your next RF Opportunity (2:30PM room 15)
       
    • You can pick your customers, You can pick your SpecAn, but you can't pick your customers SpecAn (3:30 room 15) [specAn is a spectrum analyzer fwiw]

    For those of you a bit leery of an RF-centric presentation, consider that I usually hear this at least once after presenting;

    "that was very entertaining...I'm not sure if I understood it all...but it was entertaining"

     

    Looking forward to entertaining you all

     

    ~,~

    The Captain Was Here....and will be there too.

     

    aka Norm Kirchner

    • Like 2
  4. Hi Ryan,

     

    I have exactly the same question. How do I run a contiguous step of test sequences without enqueuing all the Actions at one go, under the same processing State. Interspersing the Actions with updates and cache user parameters please? Appreciate if Norman or anyone can explain how to go about this. An example I can think of is the retired CLD EXAM on car wash controller. The action of each cycle may be interrupted by the simulated 3 switches (underbody, main pressure and Air Dry).

     

     

    Alex and Ryan et al.

     

    There is a basic coding principle that should apply to the 'car wash example' and other ones as well.

    "No one action should take longer than is acceptable for the program to react to a new request/trigger"

     

    So in short if you need to dwell at a point, as with the car wash example, you should have an idle, <no trigger> transition behavior that goes out, checks the timer and then comes back to the state.

     

    For the case where you're not just dwelling on an action and you need to perform a series of actions along a transition that will inherently take longer than what you need to have the program respond to, then there are a few other options.

    1. Make intermediate states that exist along the transition, thus enabling checking new triggers while moving through a transition.

      if no trigger happened that should get in the way of the transition, push the trigger back into the trigger Q and continue on with the next part of the trasition

    2. Break  your one transition into multiple transitions which go into and out of the same state, and have some system variable which can help the state logic know which transition to move to next
    3. You could put some logic inside of the "False" case of the "transition complete" structure of the state machine portion of the code. from there it's up to you how to best complete the rest of the transition you're on given what you're trying to accomplish
    4. As ONLY a last ditch effort, you could actually access the action queue, and jettison your current action. BEWARE however, it is now upon you to be very explicit in ensuring that you end up back at a safe state from wherever you were along the transition.

    The most important perspective and question to ponder,

    MUST I handle this trigger immediately, if so,

    WHAT must happen to handle the trigger,

    CAN I break the handling of that trigger up into two sections which would leave the system safe (one that catches and informs the user it will be handled shortly, and then the rest that can be handled down the line in the normal state machine flow.

     

    Keep in mind, that most programs that you interact with have some kind of delay for a lot of actions (fractions of seconds to seconds) and they are often glanced over.

    Must your program respond faster than what most people are used to having programs respond to. Can it just wait to the end of the current transition

    And if your transitions are taking a long time, then that's an indicator to me that you might have too much going on in a single transition.

     

    I ran across this last point very recently, where a colleague was prompting the user along a transition in which measurements would be made as well.

    For a variety of reasons, (including choosing 'Cancel' in the dialog) it made sense to have a separate state in which  the prompt would be given on the way to the new state (thus preparing the system to be in that new state) and then the idle transition in that new state, which finished up the remaining measurement actions and then at the end of that transitioning back to where he was.

     

    See some of the diagrams below for some color

    post-208-0-32388600-1422546213.pngpost-208-0-56413400-1422546375_thumb.png

  5. So I'm getting a little confused here. Everything is installed in the user lib at first, which doesn't insert the "Rex - New Command" utility in the Tools menu. Moving the whole Rex folder to C:\Program Files (x86)\National Instruments\LabVIEW 2014\project\ does the trick. But now when I click on "Rex - New Command", it can't find the files it needs and seems to be looking for them in the user lib.

     

    Long story short, what files should be where?

     

    Thanks!

     

     

     

    • I am having trouble getting this package to work. I think this is due to the installer putting code in places other than it is supposed to be (as others have noted above). I have tried moving things to try to fix this, but am not having any luck.  Is there an updated installer that fixes these issues, or does anyone have a detailed description of the changes needed to make the installed package work properly?

     

     

     

    Well, after a full system restart, the menu options are back, and creating a new command worked! Amazing what restarting a Winblows machine can do!

     

    Ryan R.

     

    All,

    I apologize for the long delay, but I've finally updated the post with a new VIPC file which addresses the Tools Menu REx create new message.

    Please let me know if this does not resolve your issues.

     

    Thanks,

    Norm 

    ~,~

    ni_lib_rex-1.14.0.31.vip

  6. FYI,

    ESF 3.0 is in the tubes and about to come out w/ the ESFx with the persistent ability option.

     

    It will not be forced but seamlessly worked into the framework because not everyone will want a sub-process running in the background and there is no way to make it perfect.

     

    We're using it internally and hopefully getting this out the door can prevent another framework doing the same thing.

     

    Please let me know if you are ready to beta test the new version.

     

    Thanks,
    Norm

    ~,~

    • Like 1
  7. A user of REx took things to beyond what I thought someone might, and started sending messages every 10ms or less.

    By doing so it exposed a potential issue if you're using REx across a network / through the EXE boundary as well I believe.

     

    The act of calling the CBR (Call By Reference node) under the hood as REx does, causes some time to be used by the UI thread.

    So if you're going to town on making REx calls and then start interacting with the UI a bunch long w/ updates and re-draws,

    You can see a performance slow down in the latency of the calls being made.

     

    See the link for a low level explanation of the usage of the CBR and the UI thread
    http://forums.ni.com/t5/LabVIEW/Threading-and-Re-Use-of-buffers-Using-Call-By-Reference-node/td-p/1506046

     

    I could comment more, but I wanted to get this out there before it slipped through the cracks


    How secure are the messages communicating this way via tcp/ip and the vi server (correct me if this is not the case)?

    Is it open to simple sniffing/wireshark/viserver listen to all?

    I know this is not a specific issue for REx, I just thought that you might have a solution maybe by communication between processes in memory for local machines or hashing/encrypting the messages.

     

    Hey there Goof.

    The state of the security is that of whatever VI Server does, which I'm pretty sure is just basic flattening.

     

    However, for those of you that are concerned about that, just this NI week, I sat down with a customer and found a novel way to replace the sole usage of VI server as the transport mechanism, which in turn should give the ability to use other more secure methods like web services and such that can use HTTPS.

     

    Do let me know if this is a hard need or just something that you figure would be something really good to consider adding / checking on 

  8. Well, after a full system restart, the menu options are back, and creating a new command worked! Amazing what restarting a Winblows machine can do!

     

    Ryan R.

     

    I'm sorry for all the troubles.

    It's true that I haven't done as much testing of the install w/ the recent builds.

    I'll double check and re-post the updates that you found. Thank you!

     

    Also, since you've now got command creation going, are you able to get it to talk across the boundaries you need?

     

    ~,~

  9. Just in case you didn't see on the registration form, I'm replacing the flight around Austin with something much more practical and life saving instead of endangering
    The official Hutzler 571 Banana Slicer (the right bending banana version only)

     

    31VTJj4VuVL._SY450_.jpg
    For decades I have been trying to come up with an ideal way to slice a banana. "Use a knife!" they say. Well...my parole officer won't allow me to be around knives. "Shoot it with a gun!" Background check...HELLO! I had to resort to carefully attempt to slice those bananas with my bare hands. 99.9% of the time, I would get so frustrated that I just ended up squishing the fruit in my hands and throwing it against the wall in anger. Then, after a fit of banana-induced rage, my parole officer introduced me to this kitchen marvel and my life was changed. No longer consumed by seething anger and animosity towards thick-skinned yellow fruit, I was able to concentrate on my love of theatre and am writing a musical play about two lovers from rival gangs that just try to make it in the world. I think I'll call it South Side Story.

    Banana slicer...thanks to you, I see greatness on the horizon.

    • Like 2
  10. Is it possible that the REx to send/receive data between two EXE on the same local host, but build from different projects?

    Thanks!

     

    Yes.

    This allows you to talk between ANY LabVIEW instance irrespective of the boundary.

    Good luck!

    The only thing to be very intentional in setting up, is making sure that you have the right 'Service Name' configured for the listener and pointing to that specific one on the remote connection

     

    Good luck

  11. EDIT: Well ok, the Rex_Sprinboard library seems to miss some files for generating user icons and such. I guess that's just not available in LV2011. It's missing files from ..vi.libLabVIEW Icon API*

    Does my installation miss something?

    All, I can't do much about the Icon stuff for the 2011 port as a lot changed around those versions.

    Your best bet is simply to edit the Command Creator Springboard and comment out the icon modification part of the code.

    It should be easy to find but if you run into trouble let me know and I'll direct you along.

     

    Hi Norm After few controls , it appears that one def-type ( KeyedArray.ctl)is missing in your dependency for the Rex_Sprinboard,and all about ICON API are missing too. Eric

    KeyedArray.ctl should make it's way onto your PC if you install AMC from the tools network.

    I'm sorry about the dependency, but because I'm not going to spend too much time on the 2011port, hopefully this will work

    Please let me know if that doesn't

     

    Happy wireworking

    ~,~

  12. I have a 2d picture .having circle,rectangle etc.and i want to control all picture from front plane using transformation VI then how to do this.As I know transformation VI is 3d picture so thats the main problem that i m facing.

     

    What kind of transformations do you want to do?

    Source distribution posted a little above, shows how to take a picture control and get the individual items from the picture and then do some kind of transformations to it.

    Namely in the example shown here, it showed lateral translations, but I presume you want to do some kind of rotation or growing or shrinking, Correct?

  13. Of what I understand, if the Action is busy executing a certain task, I'll have to wait that this task is done before executing another action.

    Coolaid

    Make sure to segregate your nomenclature. Actions and Triggers.

     

    Actions get Queued up by the State machine on the left, in response to Triggers and current Shifter data and design.

     

    So yes, only 1 action can be performed at a time, because any list of actions happen on a transition (even if the transition is back to the same state)

    That and only 1 transition can happen at a time.

    The ideal is that any transition happens fast enough for  your system to be able to timely respond to a specific trigger.

     

    If a particular transition can't be broken up to iterative transitions (think, instead of a transition being an entire sweep, it's just 1 iteration of the sweep)

    then there is the ability to interject interrupt actions which give you the ability to go back to the brain to see if an important trigger has come in that needs to be handled NOW.

     

    If it's a matter of UI updating some kind of UI magic, I would recommend making a Brat VI outside the loops to handle the interaction

  14. Hi Norm,

     

    It's tricky to say. I've installed the VPIM package in your prior reply and it claims all is well, but nothing appears in the list of installed packages for my 64 bit edition of LV 2012. So I tried re-installing it - without any attempt at removal - just to see if anything would happen differently. The resulting screen shot at the point just after the second install is at:

    http://www.iceamplifiers.co.uk/randomstuff/LV642012TLBprime_ss.png which I think only shows packages that already existed beforehand.

     

    So, very hard to say. It's not clear that any version exists as far as 64-bit is concerned. On the other hand it doesn't throw any errors when installing.

     

    On the same machine I have 32 bit LV2012 (same version) with TLB' that reports itself as "TLB Prime - Application Template v1.0.0.11 by NI Systems Engineering"

     

    Thanks,

     

    James

     

    So no other packages give you grief when trying to install to 64 bit?

    Also, am I correct in reading that, everything is working ok for the 32 bit version?

     

    ~Norm

  15. Bump? I'm using LV2013 and I'd like to give this a go, but how? I installed the base 2.0.5 package from

    but I can't install the plugin pack (apparently, my version of LabVIEW isn't compatible).

     

    Don't worry about that old link, did this work for you?

    Also, I've got the new version packaged up and ready to go, but need some beta fish to try out. ping me Norm.Kirchner@ni.com if you like

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.