LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having trouble with entering text into a "table" using shift register

hello - i have a hex-text input on the front panel and i would just like to keep a log of what was sent by using a table. i am using a shift register to pass what command i sent last, into the table but am getting a broken wire. what does the table expect to receive? and...how can i input three columns of data, including a timestamp into the table?
 
thanks...
 
i attached the vi i was trying to do this with....
0 Kudos
Message 1 of 15
(4,398 Views)

Tables expect a 2D array as input.  You can use the shift register with a couple of Build Array functions to accomplish what you need.  First of all, use a Build Array to build the message, timestamp, and whatever else you want to store into a 1D array.  This will be the new row for your table.  Then use another Build Array to take the existing array in the shift register and add the new 1D array row to that...now you'll have a 2D array with a new row...specifically, your latest message that you want to display in the log.

Hopefully this makes sense.  Check out the array examples or the LabVIEW Help for the array functions if you need more info.

-D

0 Kudos
Message 2 of 15
(4,394 Views)
what? i don't understand...from the shift register i wire a build array and have the data, and also wire in a timestamp, and then wire a build array from the first build array output, and then wire that to the build table. i just get broken wires....
0 Kudos
Message 3 of 15
(4,384 Views)
Right click on the Table indicator and select Create-> Constant. Take the constant and wire it to the the shift register on the left side of the loop (outside). This fixes the broken wire as well as will initialize the shift register to zeros on startup.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 4 of 15
(4,380 Views)

hi - sorry but im still getting broken wires....how do i enter the data and a time stamp in the next column properly? thanks...

i attached my vi to see what i did wrong

 


@AndrewAlford wrote:

Right click on the Table indicator and select Create-> Constant. Take the constant and wire it to the the shift register on the left side of the loop (outside). This fixes the broken wire as well as will initialize the shift register to zeros on startup.



0 Kudos
Message 5 of 15
(4,377 Views)

Here's a screenshot showing how to use a couple of Build Array functions to suit your purposes.  I think you should take a look at some of the LabVIEW array examples to get a better handle on how to deal with array dimensions and building arrays.

-D

Message Edited by Darren on 02-16-2006 01:00 PM

0 Kudos
Message 6 of 15
(4,372 Views)
I've modified your vi to fix the table problem.  Your table is a 2D array, so to add more rows into the table, you must create a 1D array containing the command in column 0 and the date/time in column 1.  You can concatenate the date and a space and the time into one string.  Use build array to build a 1D array with the command string and the concatenated date/time string.  Then this 1D array output can be used with build array to add to the table.  The new table data (2D array) is sent to the shift register.
- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 15
(4,368 Views)
hi - could you please save it in version 7.0 because thats how i can open it...thanks!
0 Kudos
Message 8 of 15
(4,350 Views)
Here is the 7.0 version.  I didn't have some of your subvi's so my version has a broken arrow.  It may load correctly on your system.  Even if it don't, you can still look at the changes made in the block diagram.
- tbob

Inventor of the WORM Global
Message 9 of 15
(4,334 Views)

i have a problem because all the text that is being input and output is in hex, and when the command log is displaying all the archived commands, it shows up as the weird characters. does this mean i need to make some kind of conversion first? i couldn't find a way to change it to hex display in the properties of the table

 

thanks!


@tbob wrote:
Here is the 7.0 version.  I didn't have some of your subvi's so my version has a broken arrow.  It may load correctly on your system.  Even if it don't, you can still look at the changes made in the block diagram.


0 Kudos
Message 10 of 15
(4,321 Views)