Jump to content

Francois Normandin

Members
  • Posts

    1,209
  • Joined

  • Last visited

  • Days Won

    46

Posts posted by Francois Normandin

  1. Phase of a sine wave wraps every 360 degrees, or 2*PI radian.

    Some markers:

    You'll get the initial slope of the sine wave to be negative for any values in the interval ]90, 270[ and positive in the intervals ]0, 90[ & ]270, 360[.

    90 and 270 degrees will give an initial slope of zero (cosine and -cosine).

    0 and 180 degrees will give an initial slope of 1*amplitude (sine and -sine)

    Some theory:

    The sine wave you're generating is of the form:

    y(t) = A * sin(w*t+ phi) + offset

    where

    A is the maximum amplitude

    w is the angular frequency and is also equal to 2*PI*frequency.

    Phi is phase in radian.

    If I understand your question correctly, you'd like to be able to calculate the phase necessary to generate a wave that starts at an amplitude of 60 and specify the initial slope.

    You want an initial amplitude of 60, so you know that y(t=0) = 60 and your max amplitude is 100. The equation is simple at t=0 => 60 = 100*sin(phi) or Phi = arcsin(60/100) = 0.6435 rad

    To get it in degrees, divide by PI and multiply by 180. ==> 36.87 deg

    Your solution will be slightly changed if your offset is not zero...

    Sine Phase.vi

    post-10515-0-16125100-1289050832_thumb.p

    • Like 1
  2. This command line seems to work: net group /domain <groupname>*

    I tested it on my XP machine and got the full list of names, don't know if it works the same with Win7. Assuming ActiveDirectory didn't change syntax... it should.

    Credits

    EDIT:

    Reading your question again, I guess it doesn't answer your question which is how to get CommonName from UserName... If you don't know the group, how can you get a list. :frusty:

  3. Oh I could do it this way, I forgot to mention that I mean a 3D quarter sphere. There are VIs where I can use to create a whole 3D sphere, however I only want a quarter of it.

    Sphere is 3D... I should have understood. ;)

    I see what you mean. You'll have to "Add Clip Planes" to prevent the sphere to be drawn past some limits you set.

    cut sphere.vi

  4. Well. I read "I think what is wanted is that there is not a coercion dot, because the coercion never happens." to mean that even though there was a coercion dot, it wasn't being coerced. The comparison example was just to show that even in OOP, if you coerce (yes you have to do it manually) then the result is the same.

    The result is not the same with OOP. Check this example where the wires for parent and child classes are different.

    post-10515-080645900 1287927815_thumb.pn

    The same thing is not true with VI server references. A boolean reference that runs through a control reference will still contain the boolean reference number, but the wire will be a control reference. You need to recast to boolean to be able to call methods that act on booleans.

  5. Hello Mark,

    Thank you so much. That's what I am looking for. Its working, really good.

    I'd like to propose we establish the yearly "Mark Balla Award" for the LAVA member who should be commended for having performed the most selfless act(s) of support to other LAVA members.

    The award would be in honor of Mark Balla, who has done more then anyone has ever did before to bring support to a new premium member. The yearly member elect for this prestigious award would be known at the LAVA BBQ and would receive his/her prize from the hands of Mark Balla himself.

    For the occasion, let's all thank Mark and click the little green button at the bottom-right of this post. It's the one that was the starting point of his long-lasting effort.

    Kudos Mark. :beer_mug:

    award.jpg

    • Like 1
  6. Could we have a Singular to Array in type conversion?

    Ton

    Done. (see v 1.2.0.7)

    With a bonus: mD Array to nD Array ==> insert Build Array when m < n & insert Index Array when m > n.

    <object id="scPlayer" class="embeddedObject" width="514" height="424" type="application/x-shockwave-flash" data="http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/jingh264player.swf" >

    <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/jingh264player.swf" />

    <param name="quality" value="high" />

    <param name="bgcolor" value="#FFFFFF" />

    <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/FirstFrame.jpg&containerwidth=514&containerheight=424&content=http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/singular%20to%20array.mp4&blurover=false" />

    <param name="allowFullScreen" value="true" />

    <param name="scale" value="showall" />

    <param name="allowScriptAccess" value="always" />

    <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/" />

    <iframe type="text/html" frameborder="0" scrolling="no" style="overflow:hidden;" src="http://www.screencast.com/users/normandinf/folders/Jing/media/6677742b-028e-4fde-ac19-639e1ce267be/embed" height="424" width="514" ></iframe>

    </object>

  7. If NI says it's impossible, then I guess you should believe them. There might be a workaround for you to achieve the same result but at the expense of more complex code.

    You cannot get a reference to a single array element, just a reference to the type of element. Hence, modifying its background color will change it for all elements at once.

    If you absolutely need to change the background color of individual cells, then you should take a look at Multi-Column Listboxes (MCL). The Item Names property lets you set the values from an array of strings and the MCL allows for single cell differentiation (color, font, background, etc.)

    post-10515-075512200 1287665982_thumb.pn

  8. If you're a newbie, you should definitely try the LabVIEW Help. There are tutorials but also a huge archive of all you're looking for starting in LabVIEW.

    If you don't find it there, start by searching the forums for the answer before posting.

    <object id="scPlayer" class="embeddedObject" type="application/x-shockwave-flash" data="http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/jingh264player.swf" width="1036" height="632">

    <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/jingh264player.swf">

    <param name="quality" value="high">

    <param name="bgcolor" value="#FFFFFF">

    <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/FirstFrame.jpg&containerwidth=1036&containerheight=632&content=http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/newbie_how%20to%20search.mp4&blurover=false">

    <param name="allowFullScreen" value="true">

    <param name="scale" value="showall">

    <param name="allowScriptAccess" value="always">

    <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/">

    <iframe type="text/html" style="overflow: hidden;" src="http://www.screencast.com/users/normandinf/folders/Jing/media/8393e213-3333-4975-934b-e9b9e0103286/embed" width="1036" frameborder="0" height="632" scrolling="no"></iframe>

    </object>

  9. HI all,

    i want to read open office.org Calc .ods format file in labview

    here i have attached the file please help me out.

    thanks

    Hi Pravin,

    the RGT addon, as pointed by Shaun, is an incomplete suite that creates only Writer's odt files. The framework can be extended for Calc as well but I never got to continue working on it. It is still marked as "beta" because it is not complete. It's OOP based and extends NI's refactored RGT.

    If you want, install it and take a look at the code. You can probably extract enough information to customize something for your need. It is based on the .net AODL libraries. There is a link to the development site of AODL on the discussion page. You don't need to make it OOP to make it work. Create a reference to the ODS document and work from there with the iContents and iTables/iCells that are specific to Calc. All you need to get started is to have the AODL dll accompaying your code.

    BTW, AODL = An Open Document Library

  10. I've read on Labview context help that Cildren[] property is not available at runt time, my idea is to work on private data using a reference to private data cluster from a member of the class at run-time.

    You will not be able to work on your Private Data at runtime. Creation / Removal of controls and indicators can only be done in the IDE and when the VI is Idle.

    If you want to get a reference at runtime, your best chance is with the Open VI reference and wiring "classname.lvclass:privatecontrolname.ctl". AQ mentioned that simple trick is a thread I have not taken time to find again.

    But the result is the same, you can't modify data at runtime. I haven't tried if you can even read it at runtime. I'd be really surprised if you could, because there's no reason to be able to get a reference one way and not the other. It's the same reference after all. Let us know if you succeed at runtime.

    Well, Daklu you have understood my idea: I want to use control's labels as keys in my lookup table so I can change private data definition of my class according to my needs (to be correct I must write "to my customer caprice") and I don't have to update manually the array constant you have shown in your example. Sometimes I use this technique to update those panel's controls with same name of my cluster fields (in this case my structure is a simple cluster not a class definition, of course).

    Vivante

    Probably you need to create a private method in your class to support this, instead of going to the Private Class Data directly.

  11. Hi all,

    When I use NI data connectivity toolkit to search database , I plan to use a multi list box (as a table) to display the seach database results, but I found the default output of the earch is a 2D variant array. How can I display the contents in a multi list box?

    Thanks

    You can convert variant to string and display the result in the MCL.

    I have a small utility VI to help...

    2D Variant to MCL.zip

    • Like 1
  12. Thanks for sharing this Francois,

    After installing it, I have in my palette only two VIs exposed (one of them is the test VI, and the other is the FGV). Is this all that should be there or am I missing something.

    Hello Neil,

    that's it. Isn't it wonderfully simple? :P Kidding aside, the FGV is the only VI you will need if you use this piece of code. I plan to add stuff in the palette in the form of "Drop VI Content" to speed up development around this FGV... but essentially, this VI is the core of my way of handling LVOOP events between processes. Eventually, there might be a series of low-level objects that might be distributed with it, but that's the cherry on the sundae and some programmers might not like cherries after all, so we'll see after I show some examples.

    I didn't find time in the long weekend to finalize the examples I want to share. For now, it's might not be obvious how I intended people to use it, and I apologize for that. I'll have a demo on how you can "pimp" your state machine template and certainly a small real-world application to remove some fog around it.

×
×
  • Create New...

Important Information

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