Jump to content

TG

Members
  • Posts

    225
  • Joined

  • Last visited

Posts posted by TG

  1. LabVIEW 2011 help that is.

    I Slightly modified the language from the help file to make it clearer to myself.

    ""Preserve Run-Time Class Details

    Use this function in VIs that meet the following criteria:

    *The VI accepts a LabVIEW class as an input and returns the same LabVIEW class as an output.

    *You want to call the VI as a subVI.

    *You want to guarantee that the output class type is the same as the input class type (ex: child in -> child out)

    Normally, when you wire a child class to a parent class input on a SubVI LabVIEW will automatically downcast the output class to child.

    SubVIs like these do not require you to use this function on their block diagram.

    However, sometimes it is impossible for LabVIEW to verify class type preservation in a subVI.

    Such a situation could occur if your class is being converted to a reference, then operated upon, then reconverted back to a class inside the sub vi.

    Because LabVIEW cannot guarantee at edit time that the class will be preserved you get a broken wire outside the sub VI.

    In these cases, if you know that the class type does not change across the subVI, you can use this function in the subVI

    to downcast the class immediately before returning it to the caller.

    Because this function always returns an object of the same type as target object, LabVIEW recognizes that it can downcast the returned class to that type. Therefore, this function notifies LabVIEW that it is safe to downcast the class output of the subVI node to match the input class type.""

  2. Boy Id sure like to see the answer to this myself! I hope its a simple one!

    Anyway, I hope my experiences relate to this thread.

    I once had a heck of a time transferring an EXE using FP to another machine and there was no LVOOP at all involved.

    I had to install LabVIEW as a Hacker's fix just to get by the problem.

    I have learned that FP and DAQ mx and other resources like that are unique and need special treatment in programming

    LV for executables to be loaded on to target machines.

    WHat to do to make these resources allocate and initialize in an executable is a very good question.

  3. Thank you, that works. Strangely, it is exactly what I was wanting to do in the first place, had I known (or remembered) that the INDEX ARRAY widget could be pulled down for multiple lines out (versus indexing one at a time inside a loop). For the cluster function, that much is obvious in the visual icon, and was the only reason I was going with clusters for this particular sub VI.

    Problem is I am allowed to do LabVIEW only seldom (even though I'm the designated 'guru' [coughs embarassedly] for all things LabVIEW) and usually only with other engineers waiting anxiously for me to update whatever it is that needs addressing.

    Thanks to everyone who replied.

    Been there, done that, got the teeshirt to prove it!

    I am the only LV guru in my company too :)

  4. a simple way to throttle the polling loop is to use the "Wait for Front Panel Activity" function with a long timeout (500 msec)

    How can I have never known about this function? Thank you!

    ALso when you convert an event loop into a polling event loop you will find that no matter how big the delay is your event case will respond immediately

    to your keypress or value change!

    Possible Reason for not knowing this it is NI always say "don't use the timeout" as it defeats the purpose of events.. I don't agree with that statement entirely.

    Having a timeout is a nice when you want to have a way to get control back when developing event handling code.

    Once developed it can be removed easily.

  5. Sorry I have not a manual , But I see in Youtube

    I see the Serial Com Follow it. I use confige port of labview and use visa resource name,

    But I don't identify my port

    Can you help me please.

    Sorry I am not allowed to read Utube here at work.

    LabVIEW will happily open a port for you but this does not mean it is connected correctly or that serial communiactions can take place.

    You need to establish (without a doubt) the proper configuration else it is wasted time.

    Most rs232 problems start with the physical cable not being quite right

    and then the next level to overcome is the port parameters being setup exactly as device expects.

    There is no real standard especially on older Balances like that one from Chatillon.

    Might be better to use Hyperlink until you can establish a connection then you might be able to figure out exactly what parameters to configure the port in the LabVIEW.

  6. I am going to start using VB2010 Net4 along with LabVIEW.

    I'll admit my eyes are barely open on this, but I am attracted to VB's (relatively new) ability to OO on NEt4

    (IF its a pipe dream chime in. I'll listen if you been there and have the t-shirt to prove it!! )

    At the least, learning NET seems to be giving me better understanding of specification level OO (which I could carry into LabVIEW at some point).

    I know a lot of you guys probably C++ or ansi C along with LabVIEW but I prefer the VB syntax from the old VB6 days.

  7. Or un-check the "show warnings" when viewing this library rolleyes.gif Interestingly. If you change something (like mechanical action or the unbundle names). The warnings disappear............until you save it unsure.gif Think you may have found a feature.
    I like your attitude ShaunR. Are you sufficiently pissed at the fact that you are stuck using LabVIEW forever? :)
  8. I don't have a good reason to not use Notifiers except

    preferring queues over notifiers and event structures when sharing data across VI boundries.

    Its not that these guys aren't wonderful creatures mind you. Im sure they are quite functional when set up correctly.

    I never seem to set them up correctly for sharing events and data across Vi 's. Then usually later on I get strange (to me) behavior from them.

    Queues give me no such problems.

    They always work as I expect them to, perhaps they are simpler to think about.

  9. What do you mean by "read it from multiple locations"?

    You can certainly use a lossy enqueue on a queue with the size 1, but if you use dequeue to read the value, the queue will be empty until you put another value in it.

    If you simply want to have an updated value with one writer and multiple readers, you can use a global or a notifier (with the status primitive to always get the most recent value). A SEQ with lossy enqueue will also work if you always preview the queue instead of dequeuing.

    Thanks Yair

    I forgot to say I would use the preview queue primitive.

  10. This is new information for me as well. Can you expand on it? Under what circumstances does an event queue not execute events in the order they are received?

    (Munching on lunch)

    I also thought Events had a queue in the background that saves every event "first in last out" fashion.

    Tis the one main reason (speaking for myself now) why I do not consider them particularly useful or friendly (event registration or not) for anything other than simple UI stuff like management of panel buttons etc..

    All that fancy stuff with events just gets me into trouble and it does not seem to be worth it most times..

    As to a signaling event. Its a great (simple) way to kill an event structure from somewhere else in the VI to insure a VI with event handling shuts down on request. I've had no problems with using this technique but never considered stringing them together ;)

    That would be asking for hurt down the road because there is no way to guarantee events will fire in order they are stringed up. I agree with that.

    Queues are far better for handling most events anyway. managing event structures is a bit of a pain and does not seem to return a lot of bang for the buck but again it's my opinion. I don't do complex event managed applications so I know they have their place.

  11. I need to manually un-install the following from my LabVIEW 8.5.1 installation

    OpenG Builder

    OpenG Package Builder

    OpenG tools

    Apparently I have these left over from a number of years ago; they are not intact anymore. They were

    at the time either free downloads from JKI or were beta versions.

    I may have made some kind of attempt to remove these to clear up the tools list for VIPM

    probably by deleting folders in ..\Resources ( I know I know)

    Any possible way to remove remnents of these these from Tools list?

    Thanks in advance

  12. I just ordered a new laptop, but no SSD, which is unfortunate, because I really would like the speed improvement. I'm still too afraid of the wear issues. With doing LV work all day long I'm afraid the drive would wear out too fast.

    Still if a SS drive were imaged each year (or even each day as a backup) an applications state on any given day could be retrieved in a disaster (only one days material would be lost worst case.) Assuming they are not terribly expensive It would definately be worth the risk for me. Also as a precaution the SS drive could be replaced every year or after the anticipated (or calculated) guaranteed write time is exceeded.

    On the other side of it..

    Q for me is the time gained (not waiting so long for LV to sort itself out all the time) going to be worth the additional effort and cost of enforcing a strict hardware imaging data backup procedure.

  13. Say perhaps I have a device that errors out and I want to start the main VI over to re-initialized devices, can this happen during the middle of the main VI?

    Yes it can

    Using a state machine with exception handling built in would solve your problem though there would be some time in learning how to

    make one (or get one) and then learning how to use it.

  14. I have a string containing a task name that is serialized to file. I'm currently just casting it back to a task and all's well:

    post-11742-093212100 1277733197_thumb.pn

    But is there a better way to do this?

    Dare I to say that both are identical except with the manual typecast a person can be more assured of the resource being allocated?

    Would it be incorrect to use the manual method of typecasting ?

  15. If it makes you feel any better you are doing pretty well for a beginner.

    Its tough, but only at the beginning. Once you "get it" you will be amazed at how much you can do with LabVIEW.

    I will say though that you have to work pretty hard at finding out how to get the help you need from the help files in LabVIEW (which always assume architect level knowledge)

    Contrary to Ni's assertion LV is NOT a beginner language or a non programmers language.

    PS: You can best learn LabVIEW (I think) by looking at all the examples NI provides under help:Find Examples.

    I personally think that is the best place to start when there is no clue at all and time is kind of short.

    Most of what you need to find out is probably best shown by example.

  16. Sorry I do not have code capture tool installed properly yet. SHame on me.

    Why not first get the complete response from the instrument then you can make some code to test for proper conversion

    of the strings without having to worry doing it all at once so soon.

    Look for any termination character or

    if you know for sure that it is exactly 8 bytes at a time then get the entire response in 2 stages and get the two 8 byte response strings.

    Once you have the exact response then you can figure out how to convert it to unsigned integer etc..

    Make sure instrument is not sending extra termination character or filter it out with string function to remove whitespace.

    Look at the two strings the instrument returns then work from them

    (off line so to speak) until you can get the string converted properly to the unsigned integer

    You can use LabVIEWS display utiliy to see exactly what the instrument returns.

    (Right click on string ind and select '\' codes display so that you can see all the characters that are returned from the instrument.

    This way you know exactly what you are working with.

  17. Thanks to all,

    I also agree with Scott. I kept the value change and used the appropriate form of mechanical action mentioned. Everything worked out great. Thanks Again.

    -Anthony

    The only one that I use that keeps me out of trouble is the value change event and switch when pressed.

    I create a local of the button use it to reset the control in the true case. And I don't care if it takes a little longer because it is a GUI event anyway.

    I only care that it is foolproof with GUI stuff. Of course internal to LabVIEW its possible to do it other ways.

    I learned to stay away from Mouse up for GUI push button stuff.

    This is the only configuration I have used that has not come back to bite me later with unexpected behavior.

    I know Im just a dummy for not understanding fully how LabVIEW works under the hood but I use what works for me ;)

  18. Thanks for all responses so far.

    I ended ug going for a Dell Precision Workstation T3400 525W (32bit) with two 20" monitors. ALthough the extra CPU cores and the increased RAM

    look very desirable I could not justify the additional price for the internal stuff I do. Where I work 64 bit is still as far away as ever...

    ALso I realized having two Monitors is the most important part especially with my vision.

    Also, if the target platform's screen isn't the same resolution as the development screen, there WILL be font size issues.

    I have not seen issues yet in this regard,. Is it because I am using system controls and indicators or have I just been lucky?

  19. Look at Croos rulz diagram again and

    you will see that all you need to do is make 2 unsigned 8 bit numbers from the serial data you are getting from the instrument.

    Use the string conversion functions to convert your string representation into a numeric one.

    Once you have both numbers available plug em into the Solution shown above (with some minor modifications of course)

    As to the actual serial communications part I can't answer that because there is not enough information.

×
×
  • Create New...

Important Information

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