Jump to content

LAVA 1.0 Content

Members
  • Posts

    2,739
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by LAVA 1.0 Content

  1. QUOTE(Natu @ Feb 1 2008, 06:48 AM)

    I have made some subVI with "while loop" and wih "time delay" with different differet mill seconds and if i am calling these subVI in Main VI here also i have given "time delay". But subVI are not executing with time delay what i have given while making that subVI. Please help me, how I can set "subVI property" so it should execute with its own time delay in "main VI".

    Why do you post your the same question only in two categories? There are much more... :blink:

    Just post your vi...

  2. QUOTE(Michael_Aivaliotis @ Oct 15 2007, 02:23 PM)

    Using the Register Event Callback node.

    I feel your pain, Mike...

    I had a strange bug that I assumed was a race condition. The value would get set without being triggered.. I fixed something else, unrelated, and it worked fine. There was a discussion about this on the NI forum. But I must admit that I'm still a novice with these Callback Events.. :(

  3. QUOTE(crelf @ Jan 30 2008, 11:15 AM)

    Nope - no problem here. That said, I spent a loooong time in my youth working on limb independance to overcome that very issue (I was a percussionist).

    I did the same but concentrated on fingers. This let me learn to solder with one hand but all derived from once being asked to try and "twidle my thumbs" such that the were counter-rotating. There is also a "mind-trick" that will make sthis much easier. The "trick" is to think of the two motions as one rather than as two independent operations. In the "twidle" example it can be thought of as 1) Move both thumbs down, 2) Cross thumbs at the bottom, 3) move both thumbs up, 4) cros thumbs at top, lather rinse repeat.

    Ben

  4. QUOTE(Gabi1 @ Jan 25 2008, 02:27 PM)

    i have no problem referencing the waveform. but i cant find the property to clear the chart. writing an empty arry doesnt do the tric (history data is kept in the waveform itself, and is not retrievable to my knowledge).

    It's work for me.

    This is the definition NI give to this Property.

    QUOTE(Property: History data)

    Array of the history data of a chart. Wire an empty array to this property to clear the chart history.

  5. I can't open your code because I did not install LV 8.5 Yet. So I can't give you comment on your code. On the other hand, I just want to point it out that you may use event to read your data with the VISA Event function. (Instrument I/O\VISA\VISA Advance\Event Handling, in your function palette).

    Hope this can help. wink.gif

  6. Thanks mballa,

    This is close.. but not quite what I'm looking for.

    Imagine what you posted, but no Cluster control. So no source of name.

    Where I see a recurring use (for instance) is the ouput of a number of math steps that end up in an Indicator. Let's say you remove the indicator and wire that to a Cluster. Next to this would be a string array that contains a list of labels. I want to... hum... maybe what you posted would work.. with a slight modification..

    I was about to say.. "I want to assign the name of each element in the cluster a name from the label array". I will go visit the Open G vi's. You gave me an idea..

    THANKS!!

    :)

  7. Thanks JDave!

    Yes... I've thought of using Variants.. Especially since the database is presented as a 2D Variant array.. Maybe I should just deal with Variants instead of converting and searching and so on.

    At one time, I was attracted to Variants and someone told me to stay away.. Somewhere on the NI forum.. But I like those examples you pointed to.

    What the heck.. Variants it is.

    Now since I came back to post additional info.. Here is another image of what I wanted to avoid. .. :)

    I'm aware of assigning the name with the constant wired to the type of the Variant To Data. I wanted to make something more universal..

    I'd still like to learn that technique... as an aside to the original topic.. :D

  8. I am looking for suggestions on how this coding approach can be improved. I want to programmatically build a cluster of arrays than can be later unbundled by name.

    The way the cluster is populated is by first reading a database Table and listing all the columns within that Table. The column contains elements of various types, that will be handled properly and not be part of this particular exercise.

    The challenge is that I have access to the column names (they are in the columns array). The column information contains the types for each column (let's not pay attention to this now). In the attached image, pretend that PARTNO(n) are different names of columns. Let's also pretend every element in the database table is of the same type.

    Instead of duplicating the code n-times for PARTNO's, I'd rather put the 2D Variant array (entire dataset) to a For Loop, where I can extract every element of each column and store them into their own arrays. So an array of PARTNO, another array of PARTNO 2, and so on.

    However, at the bundle into array, I want to wire it in such a way that I can unbundle by name later. So the databse cluster would contain the name of the column where the data originated from. That way, a sub-vi can access the element array by unbundling by name. Simple. Plus the idea is that this can be used for any database with any column names and the end result would be the same, a cluster of arrays that can be indexed by name of the column which it originated from.

    Hope the above s clear.

    Here is the picture.. Many Thanks!

    RayR

  9. QUOTE(Jake of All Trades @ Jan 23 2008, 11:32 AM)

    Hello! I'm rather new to all this (and programming in general, really), so please bear with me. What I want to do is to make the simple gauges in LabView look more like, well, this: gauge.jpg

    Now I have the image files (needle and background) I want to use, but I can't for the life of me figure out how to assign them to a working indicator. I'd actually just be happy changing the needle to my own, but that's what has me flummoxed. When I substitute my needle in (png) in the "customization" panel, it orbits around the gauge instead of rotating about its center. Searching this forum lead me to believe that this is an inherent flaw in the software, but the remedies for it were way over my head. I keep hearing "use XControl", but I have no idea where to start with that... Would anyone be so kind as to give me a bit of a step-by-step? Again, to simplify, I really just want to replace that ugly red triangle than the gauges use as pointers with my own image. Thank you all so much, and my apologies for being such a green-horn!

    PS: Oh, and here is my needle design if you're interested:

    needle-final-mid.png

    Implementing your idea as an XControl is a great suggestion IF you are familiar with XControls since all of the work that goes into making this work complete re-usable. In this case the "work" is not trivial. I do not concider myself qualified to explain how to implement this as an XControl since I am only now learning the details of implementing XControls.

    So I will set the idea of an XControl to the side and try to outline how you can get what you are after. Yes, the needle not rotating is concidered a bug and I will not old my breath waiting for NI to fix this bug since it is on the extreme edge of possible use cases.

    So the challenges in your request are two-fold Rotating and Over-laying.

    In http://forums.ni.com/ni/board/message?board.id=BreakPoint&thread.id=14&jump=true' target="_blank">this thread on the NI-Forums you will find many links to discusions of how to use the Pciture Control. In that thread you will find an example posted by Christian Altenbach that shows you how to rotate an image. If you combine his demo and use the Create Mask VI located on the Picture palette, you should be able to rotate your needle, mask the backround color, and then insert it into a a picture that already has your guage baqckground.

    I hope that helps,

    Ben

  10. QUOTE(tcplomp @ Jan 23 2008, 07:02 AM)

    The second part should be done with an ActiveX callback, I have implemented such for the NI report generation toolkit, to warn the user NOT to close the workbook, from there you could send user event.

    Ton

    Thanks Ton,

    Working on it using callback..

    How do you genenrate a trigger from the Strictly Typed VI created by the Reg Event Callback?

    It's hard to describe what I'm trying to do. So with reference to attached image, pretend that the event "create report" is one of the state in the Event Structure and "VI Activation" is another event in the same structure. How do I get the bottom one to trigger only from the User Event (Word closing) from the one pictured above it? The reference in the top one is for the VI at the bottom. I realize VI Activation is probably not the event to choose..

    Since the VI being referenced by the Strict Type does not allow to change the connector pane (ie add terminals), how do I trigger a LV event within the Event Structure.. This would be easier to explain with a mind-meld..

    ;) I can open word, close it and it triggers the event to execute the VI referenced... that works.. I need to get it to trigger the next step.

    Many Thanks

    RayR

  11. Using LV to open and work with MS applications is no problem.

    I can create a new docuiment & save it..

    I need to bring the Word application to the Front and keep it there until it (Word) is closed by an Operator.

    Upon closing the LV application needs to detect that it is closed and trigger an event (more actions).

    My questions are:

    1. How do you bring the MS Word to the Front and keep it there. I'm using an Event Structure, and there are no events occurring after the document is completed... However, about mid-way through the document, the Front Panel (VI) goes to the Front.. I have set FP.IsFrontMost to FALSE before / after editing the MS Word document... It just doesn't want to stay at the front.

    2. After the Operator looks at the report, he closes it. Closing the report must trigger an event. Is there an easier way than registering a User Event and then triggering on that? If this is the way to go, I would need help with User Events...

    Thanks,

    JLV

  12. QUOTE(zappa2 @ Jan 22 2008, 07:40 AM)

    Hi ,

    I realize that this is a very basic question, but I could not find the answer.

    If I have a simple front panel control, like a Boolean switch or a selection list, how can I generate a Boolean TRUE event after a control change? (With this event I'd like to leave a loop) (STOP = TRUE)

    thnx, Jasper

    Take a look to "Login dialog.vi" in the Ni Example Finder (Help/Find Example...). This VI does exacly what you want.

  13. QUOTE(silmaril @ Jan 20 2008, 06:09 AM)

    Of course there is a difference! You have other questions to solve! ;)

    OK, what really matters is that the recert exam is exactly the same exam that someone has to do who does his first CLA certification on the same day. There is no "short version" ro the recert people.

    I had my first CLA re-certification half a year ago and found that the exam topics really had changed, since NI had introduced a completely new LV Advanced course.

    But I don't assume the topic changes will be so big in the coming years.

    That is how I see it as well with one exception. As I read the NI docs the re-cert req is 70 points vs 75 points to certify the first time. I am not sure if that is a contradiction in the docs because I never found that difference spelled out in a single location. I'd go find links for these docs on the NI site but after passing the new format I really don't want to look at that stuff again soon. ;) . It just seems that the CLA stuff distracts me from learning more of the interesting aspects of LV. Anyone else feel that way?

    BTW Congrats to you Silmaril ! :thumbup:

    Ben

  14. QUOTE(crelf @ Jan 17 2008, 06:53 PM)

    Yes - you're absolutely correct. I was thinking of the mouse-up event (the one I use the most on UIs). Sorry for the confusion.

    I can not disable this "boolean control" since its in the hand of the user/operator. Actually this bollean is having the mechanical action as "switch when pressed" and changing the value from "False" to "TRUE" will start running "Test scripts/suites" automatically one after the another (like loading the config files and stuff like that and all the controls in the front panel except this "boolean" are disabled) . Now Changing the Value from "True" to "False" must "ABORT" the "Test scripts/suites". and hence the "boolean" must always be enabled.

    Now the problem is one of the "state" in the "state machine" is responisble for the exectuion of "Test scripts/suites" automatically (its in a while loop(a while loop in a "state" of the "state machine")) and if i changes the value of the boolean from "true" to "False" then the "value" change event gets triggered which i do not want to happen. (since i am taking the control refnum of this boolean and checking the boolean state in one of the subvi) and this event i need to discard.

    Hope i have explained enough about the problem.

    Also currently i am doing some "QUEUE" operation that will remove unnecessay inserted state during this boolean event and the application is running quiet well without any problem. but somehow i am not happy with this part of the code.. So can anyone please suggest

    PS: The event case which handles this boolean event whose property "Lock Front Panel until the event case for this event completes" has been "UNCHECKED"

  15. QUOTE(TobyD @ Jan 16 2008, 12:08 PM)

    Something like this:

    http://lavag.org/old_files/monthly_01_2008/post-8758-1200503208.png' target="_blank">post-8758-1200503208.png?width=400

    Or as Aitor said you could check that the NewVal parameter is True.

    This is what i am doing right now. but I have a "INSERT QUEUE" function that will navigate the control to diferent part of the states in the state machine. On the "value change" from "True" to "False" i would not like to navigate to other states.(rather i would like to stay in the "IDLE" state which is the state where i handle all the value chnages and other events in the EVENT structure). Only when the boolean value is changed from "False" to "TRUE" i would like to navigate. So i need a mechanism to discard the event. It looks like registering this boolean dynamically and handle the events would be a good idea. let me try it out.........

×
×
  • Create New...

Important Information

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