Jump to content

Grampa_of_Oliva_n_Eden

Members
  • Posts

    2,767
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by Grampa_of_Oliva_n_Eden

  1. QUOTE (cbolin @ Mar 17 2009, 01:10 PM)

    QUESTION TO ALL LAVAites !

    Can any of you recall a faster CAR to fix/patch cycle than we see with this post by coblin?

    Thae CAR was report on "02-18-2009 05:27 PM " in this thread on the dark-side.

    27 days latter we have a fix!

    I can not recall any previous PUBLIC* bug getting fixed that fast.

    Is this a new record?

    Ben

    * PUBLIC = No Beta bugs don't count.

  2. QUOTE (Jeffrey Habets @ Mar 17 2009, 11:30 AM)

    True, and for 'normal' (non class) data I would add a header containing file type and versioning information and read that first before attempting to further process the file. I'm using classes here to make life easier and let them do the versioning. I'd expect LV to be smarter when loading the data, because it has all information it needs in the class datatype.

    As a matter of fact, I just tried the same with a cluster wired to the Read binary primitive and there I get a more expected result when opening a file with other (than the cluster format) data: LV returned error 116, Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data. It should throw the same error with classes.

    THere is a little difference between those two situations. THe cluster can only be of one format. Class data can constis of its dat plus any of the data for the children. Which flavor of the Class (vs children's version) is stuffed in the class data (somewhere!). But how would the file primative be able to pull out the format without reading at the very least some type of header. Since the header is the wrong type it get formatted badly as you reported.

    This does highlight the work that Stephen and his crew put into to LVOOP.

    Have you concidered flattening the data and writting it to a text field following your normal header technique?

    I am not saying this is NOT a bug.

    I'm saying;

    1) I expect it to have trouble so I am not suprised.

    2) If a bug fix for this case slows down LVOOP, I would have preffered it not be fixed.

    Just my two cents,

    Ben

  3. QUOTE (Jeffrey Habets @ Mar 17 2009, 10:14 AM)

    Hi,

    I have a case where I use the power of LV-Classes and their automatic version mutation capabilities for storing data to a flat binary format by just wiring the class wire to the "Read to binary file" primitive. Writing/reading class-data of different class version works like it should. However when for some reason the user would select a non-class file (e.g. some text file), I would simply expect the "Read from binary file" to return some error I could act upon.

    Instead, LV throws a "Not enough memory to complete this operation" dialog at me, then when I click Ok on the dialog, after a really long (10's of seconds) timeout I get error 4, End of file encountered out of the "Read from binary file" primitive.

    I'd qualify this as buggy behaviour. What are your thoughts?

    I experienced that myself and put it in the "Don't DO THAT" collumn. That is the same effect as what heepens when you (or LV 7.0 when quickly closing and opening files, no you don't have to believe me ;) ) mix up you file references for files of two different file types. The File primative trusts us that the file is of the type specified.

    Ben

  4. QUOTE (shoneill @ Mar 17 2009, 04:06 AM)

    ...

    To know more about noise reduction techniques, you kind of have to first know about the signals upon which the techniques should be used. Noise reduction in optical systems is different to digital systems is different to analog systems.....

    Shane.

    "Noise Reduction Technique in Electronic Systems" by Ott.

    He starts with each noise condition, applies Maxwell's laws, and reduces each case to rules of thumbs.

    Many touched on not over selling, knowing your own capabilities, etc. These all boil down to "looking someone in the eye..."

    If you can't look them in the eye and tell them you are an expert then don't.

    If you can look them in the eye and tell them you have solved problems in LV and look forward tod doing so again, then stick with that.

    "Let your yes mean yes and your no mean no."

    Another note:

    If you get to the point in an interview where you get the feel that this is not going well, make the best of it! Star asking the interviewer question like "WHat skill would you like to have seen?", "what would you recomened...." etc.

    Ben

  5. QUOTE (TG @ Mar 10 2009, 12:58 PM)

    Thanks Ben

    All I know is when I put the exception handler in and ran it over the weekensd it worked ok however

    when I exit the program (The LabVIEW executable I built)

    Monday Morning Windows was acting funky like it was out of memory.

    It is a low price IBM laptop with 512MB like the 1970's but..

    BTW Thanks for doing the testing and reporting to us.

    You say simply clearing the buffer works and no side effects?

    Do you also keep ythe default (4096) buffer size?

    Maybe more than one issue but focus on serial.

    It is rare that I have to mess with the buffer size, but I'd keep it the same. Generally just checking the number of bytes waiting at the port and reading those is enough to clear the garbage. If your device is spewing data at a hight rate and you think there would be data in the serial ports hardware buffer then the Flush will take care of that.

    But technically speaking this is just putting a bandaid on a wound. Framing errors are usually due to corruption of the serial data because there is something less than ideal about the physical connection.

    Take care,

    Ben

  6. QUOTE (crelf @ Mar 10 2009, 10:45 AM)

    Have you reported it to NI? If so, do you have a CAR#?

    No and no.

    BTW: DAQmx Tasks will do the same thing (but you will have to trust me on that one. ;) ) That behaviour SEEMS to apply to every resource allocated by LV. I think it has to do with hedging against the possiblity that someone that doesn't know what they are doing cloising a ref and then latter trying to use it (trap catcher?), but NOW I AM speculating.

    Ben

  7. QUOTE (crelf @ Mar 6 2009, 01:12 PM)

    Here is Dan Mondrik confirming there was an issue with opening and closing VISA sessions. Yes that post is old but I work across LV versions and there only has to be one version that is buggy for me to adapt my rules. Here is a more recent reference to VISA and leaks that recomends making sure they are the most recent version of VISA. I never said the leak rate was high. I have apps that run for years without restarting so even a slow leak is of concern to me.

    I have an LV 8.6 machine running a test to see if this issue exists in a more recent version. So far it holding so that issue may have been fixed.

    Ben

  8. QUOTE (d_nikolaos @ Mar 6 2009, 12:17 PM)

    Hi everyone,

    I take some values from rs232 and I want to transform that values to waveform. Is that possible?

    These values are long integers(I32).

    YOu will need to use the build waveform node found on the Waveform palette. If you expand it you will see it accepts three values "T0", "dt", and "Y". since you are uisng serial I suspect your values will not be equally spaced in time. If that is true then you should not put more than one rading in the "Y" array but use an array that contains a single value for the "Y" input. WHen you only have a single value in the Y aray the "dt" is not used so you can ignore that input. THe "t0" value is where you specify when the value was taken. If you need how to convert your I32 to an array of floats post back.

    Have fun!

    Ben

  9. QUOTE (TG @ Mar 6 2009, 10:57 AM)

    Can you elaborate further on this point?

    Trust me I am not dissagree with you even if I do not know full answer.

    I got this error even though I open/close the port before every exchange

    (was required to make it reliable as it currently is)

    and many thousands of successful queries on the device yet this error still manage to creep in randomly.

    When last i looked there where about 1K bytes allocated for every opean which were NOT released until after LV shutdown for every open opeation.

    Ben

  10. QUOTE (TG @ Mar 6 2009, 10:44 AM)

    Hi Guys,

    Quick Q for those who are familiar with VISA serial functions.

    My device sometimes returns error after long periods of perfect operation

    −1073807253 A framing error occurred during transfer

    I have seen this error before but never could figure out why it happens randomly after many thousands of perfect exchanges.

    There is not too much I can do about it regarding the connections or the fact that it is going through a USB- Serial converter (Its on a laptop)

    I am attempting to deal with this by putting in exception handling code that will catch the error then Close the port then

    Open it again for a retry of the operation.

    The Q is once an error like this occurs would an approach like this save me from further issues

    does anyone have experience doing something similar to recover from a VISA error and will it work long term?

    Thanks in advance

    Framing Erors are generally due to issue with the transmission medium.

    I question the need to close and re-open. Just flushing the port and doing a retry would be my first attempt at handling this situation. Closing and re-opening a VISA session will bite you eventually uless the app is restarted regularly.

  11. QUOTE (Yair @ Mar 5 2009, 12:50 PM)

    Which kind of swearing is this? :!:

    The answer to both your questions is no. If you used a Yud it would "Yefferson" and the double F is simply replaced with a Pe. The J is accomplished by having a Gimel with an apostrophe. It looks like this (hopefully this is Unicode):

    ג'פרסון

    P.S. The use of J as a replacement for Yud is only from Hebrew to the languages using the Latin letters, never the other way around. Interestingly, some languages pronounce J differently (e.g. Juan in Spanish, and I believe the Dutch also do this sometimes), so people might have three or four different ways of pronouncing the same word (e.g the name Xavier is also sometimes written as Javier and I wouldn't be surprised if some people pronounce it with a J).

    Thank you Yair!

    It has taken me more than 16 years to get an answer to that question.

    Ben

  12. QUOTE (Yair @ Mar 5 2009, 12:20 PM)

    I can't say I read that post (I mean, why would I?), but the word "gematria" caught my eye. For those wondering, it refers to the process of assigning a numeric value to each letter, summing these values and comparing these sums between words, as is demonstrated in that post. I can't say I saw anyone do it English, though. It is actually interesting to note that one of the Hebrew words for "God" also comes up to 26.

    I tried it once!

    After watch Bill Clinton's swearing ceremony first his first term in office, I was suprised to learn his middle name was "Jefferson". So I did my best to transliterate William Jefferson Clinton into hebrew (using an appendix in Webster's Unabrdged Dictionary) and did the math. The big question I had was itf it was "valid" to use the letter "yud" (?) for the "J" and wether or not the double "f" warrented two letters or if it should be transliterated as a single character. Indiana Jones indicated my guess about the "yud" was right but still not sure about the double "f". Judging by history I guess I should have only used a single character for the double "f".

    Ben

  13. QUOTE (swalpole @ Mar 4 2009, 02:16 PM)

    Hi Jakub,

    I had a somewhat similar situation, and I'll explain what I did in case it is helpful. I used a LabVIEW class hierarchy and then dynamically loaded the needed classes. This worked well in that I could write code using the base class and not worry about which particular implementation was needed.

    In the "Cluster, Class, & Variant" palette of the functions palette there is a "Get LV Class Default Value.vi" that I used to dynamically load the class I needed. I then would unflatten a string representing the configured class into the dynamically loaded default value.

    In my case, the classes were always runnable because all the classes only depended on VISA. In your case some classes would be broken if the appropriate driver wasn't installed. As long as you didn't load these classes, I think you would be alright, but you might want to verify that. Also, if you are building your code into an executable then you'll need to make sure all classes are runnable on the computer you are building from.

    As far as best practices goes, I designated a directory that was for my classes that the main program would scan from. I could then allow the user to pick from a list of what class to use. I ended up building this code into an executable. The dynamically loaded classes were part of the build as well. Because my classes and the executable could call common code, I ended up having the build specification mimic the file structure I used for development instead of putting all the code into the exe. This gave me a small exe with lots of vi files in folders with the block diagrams removed. I don't know if this is a good practice, but it seemed to make my life easier when the classes needed to load their subVIs.

    I hope this helps. I know some developers aren't that big into classes, but they have worked very well for me when I've used them. I'll be curious to see what solution works best for you.

    Shawn Walpole

    Adding to Shawn's post;

    Yes investigate using LVOOP.

    The Class libraries do not have to be part of the exe. You can put the appropriate Class in the right place when the driver is loaded.

    Ben

  14. QUOTE (crelf @ Mar 3 2009, 04:29 PM)

    ...

    Although, neBulus beat me to it :)

    In all fairness I made that recomendation based on something that crelf said in a meeting about a month ago. :ninja:

    So like most stories here on LAVA they end with a carrige return and Line-feed with a little "e' thown in to allow access to the imaginary*.

    Ben

    * If you think that was bad, I can out do that! Here is a LAVA palindrome.

    "Avalon did no LAVA"

  15. Here are screen shots of a project I developed that had a similar (I am guessing) structure.

    post-29-1236102978.jpg?width=400

    THere is some extra stuff done on the "Save" side since my plug-in object where not by value but actually my own version of "by reference" So the For loops queries each object for its current state. But after I have all of the states they just slip into the class data and are saved as a binary.

    The restore side was even easier since I knew the state of teh object (read from file) so I did not have to query them but rather re-create them.

    I was very pleased will how well this construct adapted to changes in my class data. The only problem I ran into was when I added a field to fix an issue in the object. THe reading from file was fine but when I restored objects that had been saved before my fix was added, they didn't have the required field so they still suffered from the bug that I had just fixed! The work-around for that situation was exactly the same as when we upgrade a LV app and one of the parts is acting stupid, just delete the object and recreate a new one.

    Ben

  16. QUOTE (Daklu @ Feb 27 2009, 07:49 AM)

    I've been forcing myself to use quick drop recently and am learning to like it... except for one small thing that's been annoying me. I almost always get the correct function highlighted in the top edit box within 2-3 keystrokes, even if the main listbox still has dozens of entries in it. What I'm finding irritating is to select the function in the edit box I need to either find it in the list box and double click on it (a relatively slow process) or hit the 'Enter' key, which requires me to move one of my hands away from their regular coding positions. (Left hand on ASDF, right hand on mouse.)

    Is there a way to bind another key to perform the 'Enter' key function? I'd like to use the Tab key to accept the auto-complete guess, but other options such as Ctrl-Space or even Shift-Space would work for me as well.

    I'm confused.

    As soon as the proper item is selected a left-click on the diagram should start the drop.

    Where or why does the enter key get involved?

    Ben

  17. QUOTE (Michael Aivaliotis @ Feb 26 2009, 11:37 AM)

    I think a coding challenge involving LVOOP would be nice to see. Also, how about having an NI Forums vs. LAVA Forums competition?

    Good idea! LVOOP has not been covered in any previous challenge. So what type of "bunch of similar stuff but different" challenge could we use? How about "Bug wars" where two ant hills with workers and warrior ants do battle.

    So which side do the cross-posters contribute too?

×
×
  • Create New...

Important Information

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