mbrowne
-
Posts
15 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by mbrowne
-
-
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.
-
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. ....."
-
Here is how you can convert a voltage to the correct format and send it using visa write.
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.
-
-
-
Use the "Date/Time to Seconds" to convert 1/1/1970 to a LV time stamp (seconds from 1/1/1904)
Then add the seconds returned from your hardware to this value to give you the LV time stamp for the harware.
The native LV time stamp for the harware can now be used as an input to the "Format Date/Time String" function etc.
- 1
-
It is just the Index Array in the Array Sub-Palette
[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
-
This should be what you need.....
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)
-
-
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)
CongratulationMichael 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.
-
QUOTE (Ton @ Oct 18 2008, 08:17 PM)
Thanks, I assume that setting the 'keyfocus'=True for any other control will take focus away and will trigger the event.Setting the 'keyfocus'=True for any other control will take focus away from the string and cause the value change
event to trigger if you were editing the string and had changed it's value.
-
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.
-
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.
-
The following should work without the need for a batch file......
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.
signed binary problem.
in LabVIEW General
Posted
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..