Jump to content

mbrowne

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by mbrowne

  1. You can use the timeout event to run code every 10 minutes

    If no other events occur the timeout case will run every 10 minutes..

    post-9410-0-39443100-1302260724_thumb.pn

    thank you somuch for brief explanation. I have one more problem with my event structure that contains 10 event cases. In that event cases are run according to the button press. I would like to run one of the case for every 10 mintus to update the data. is it possible to that with one event case.

  2. The Word indicator whish I set to display numeric data in binary format, shows the binary data with MSB on the left down to the LSB to the right (as you would expected) !

    Therefore it shows 1100001101001101 which is equivalent to C34D hex!

    When you probe an array, index 0 is on the left with the index increasing to the right. Therefore when you probe a boolean array the LSB will be shown on the left and the MSB on the right.

    This is why the probe of the boolean array is the reverse of what is shown in the Word indicator!! But they both represent the value C34D Hex.

    Really, I am confused and i need to know how it is displaying the binary "1100001101001101" after replace array subset. Before your message i think that it will add the coming 5 bits after 11 bits. On that time, i don't have any answer my self that how it is displaying "1100001101001101" instead of "1011001011000011". I have seen with probe now and I saw the output as "1011001011000011" and not "1100001101001101". Then how i got the real output or am i get going in wrong way.

  3. That is the Replace Array Subset (not Reshape array), and from the help description it "Replaces (not appends) an element or subarray in an array at the point you specify in index."

    It our case it replaces a 5 bit subarray in an 16-bit array starting at index 11.

    It will replaces:

    Y[11] with N[0]

    Y[12] with N[1]

    Y[13] with N[2]

    Y[14] with N[3]

    Y[15] with N[4]

    So the resultant output array is {N[4],N[3],N[2],N[1],N[0],Y[10],Y[9],Y[8],Y[7],Y[6],Y[5],Y[4],Y[3],Y[2],Y[1],Y[0],}

    Probe the wire to see what data is on the inputs and output to see this working

    Again you are heading in the wrong direction using Type Cast conversion, use the Number to Boolean Array instead!!

    The Number to Boolean Array "Converts an integer number to a Boolean array" which is exactly what we need here, not a type conversion!!

    But the Type Cast help clearly states the difference between the 4.x data and normal typecast converstion is how boolean data is handled.

    "..... LabVIEW 4.x and earlier stores Boolean data in two bytes unless the data is in an array, in which case LabVIEW stores each Boolean element in a single bit. LabVIEW 5.0 and later stores Boolean values in a single byte, regardless of whether it is in an array. ....."

  4. Here is how you can convert a voltage to the correct format and send it using visa write.

    post-9410-0-95788700-1302170957_thumb.pn

    No type casts needed. For what you are trying to do use the Number to Boolean Array

    I would like write two bytes of information to write visa. Two bytes consisting with 5 bits as signed (exponent) and remaining 11 bits are mantissa. I have done some coding but i need extend that to two bytes. you can find attched vi. At last i have to add those 5 bit and 11 bit to a two byte value. example, 3.3 is written input and output should be ---------> 1100001101001101----> here first fivets represents -8(always signed) and next 11 bits represents(845).

    One more doubt, Please say in one sentense. what is difference between 4.x typecast and normal type case. I read the help information and not understand any thing.

    i have done some coding and did not got the original output.

  5. The following should do the job ..

    post-9410-0-78415500-1302083725_thumb.pn

    The Boolen Array to Number nodes need to be setup correctly ...

    In the Properties (right click menu) set the Output Configuration to I16

    post-9410-0-84958000-1302084094_thumb.pn

    And make sure the Sign Extension Mode is set to If Output is Signed (or Always will work here)

    post-9410-0-29016100-1302084431_thumb.pn

  6. It is just the Index Array in the Array Sub-Palette

    post-9410-12512941993_thumb.png

    [from the LabVIEW Help]

    When you wire an array to this function, the function resizes automatically to display index inputs for each dimension in the array you wire to n-dimension array. You also can add additional element or subarray terminals by resizing the function. The connector pane displays the default data types for this polymorphic function.

    [/from the LabVIEW Help]

    In this case when you wire up the 2D string array to the array input it resizes to provide a row and col index.

    Just wire up the col index (leaving the row index unwired) to get the complete column.

    i am afraid i can't find this function. i'm using labview 8.5. what are its features ? what is its name ?

    thanks

  7. This should be what you need.....

    post-9410-125128318099_thumb.png

    Hi

    I have a file with an header (the column names) and data

    fields and data are delimited by space

    example

    date size amount lenght number

    1/1/2009 20 2000 12 3

    ..

    ..

    other 100 rows with similar data

    ....

    2/3/2009 10 4000 1 333

    i would like to read only the data that "belongs" to the fields amount and number

    keep in mind that order an number of fields in the header can change

    example of other header

    size number length other1 other2 other3 other4 other5 amount other6 other7.......

    any suggestion ?

    thanks

    (i need something like get data by column name)

  8. Big Thank you to Mark for organizing this challenge :thumbup: .

    And thanks to everyone who voted for me.

    QUOTE (mballa @ Nov 7 2008, 04:11 AM)

    Congratulation

    Michael Browne for creating the best 3 button dialog rewrite.

    Thanks to hfettig and JKI for participating.

    and thank you very much to the 15 members that voted.

  9. QUOTE (Ton @ Oct 16 2008, 07:53 PM)

    I know only one workaround: 'Update value while typing', but that one is very hard to filter to see what really happened.

    Anyone has an idea?

    Ton

    An other workaround is to manually set the focus of the string to false before you read the terminal...

    (and set the string focus back afterwards if you want) see picture...

    This will cause the correct updated value to be read and the value change event to be fired AFTER the menu event.

  10. QUOTE (torekp @ Sep 16 2008, 12:40 PM)

    My problem is: sometimes both loops execute (intended behavior), but sometimes only the top one does.

    Before both loops are started the state indicator is not initialised and will most likely be set to "stop" from the previous run of the VI. Now if the bottom loop starts execution before the top loop it will check the state indicator which is set to "stop" and the loop will immediatly exit. However if the top loop starts before the bottom loop the state indicator will be changed (to "wait4Init" initially) before the bottom loop checks its value.

  11. The following should work without the need for a batch file......

    post-9410-1216662499.jpg?width=400

    QUOTE (OrangeAndGreen @ Jul 21 2008, 05:22 PM)

    Nevermind, I figured out a solution while playing around. For those who are curious, I created the following batch (.bat) file:

    C:\WINDOWS\system32\dfrg.msc

    exit

    Calling the batch file with System Exec successfully launches the Defragmenter.

×
×
  • Create New...

Important Information

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