LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

switch out cell

Dear,

 

I got no code yet because i really don't know how to do it,

i got a table and in the first column store data like 1,2,3,4,5 ...

now sometimes its necessary to block a cell that when im reading the values

a number can not written to a cell like 1,.,2,3,4,5...

how can i do that ?

 

0 Kudos
Message 1 of 17
(3,792 Views)

Hi drek,

 

use an event structure to catch user actions. Disallow (aka filter) those actions when the user tries to change that element of your table…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(3,766 Views)

thx for the answer but those data are coming from rs232 so it is not user input 

so i should be able to switch out a cell with software.

 

greetings and thx

0 Kudos
Message 3 of 17
(3,754 Views)

Hi drek,

 

those data are coming from rs232 so it is not user input so i should be able to switch out a cell with software.

You wrote you got a table. A table is an UI element displaying data to the user…

 

When you receive your data from RS232 you need to parse the data. In this parsing process you can handle all the data items as you like, including "blocking" parts of them…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 17
(3,740 Views)

but dont find the command to block a cell ? 😉

0 Kudos
Message 5 of 17
(3,735 Views)

Hi drek,

 

there is no "ready-to-use" command!

 

It's your job to parse the received string. And it's your job to handle the received data in the string. And it's your job to put the data from the string into a "table" (or better: array) and while doing so filter out unwanted items! (All this is called "programming" 🙂 )

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 17
(3,728 Views)

A little confused here...

 

You're reading data from RS232 and putting it into a table?

(You're putting it in the table, not somebody else, right?)

You want to stop yourself putting data in the table if you are trying to read from the table at the same time?

 

Have I interpreted your vague description correctly?

 

You don't need to 'switch out' a cell (whatever that means) - you just need to not put data in the cell if you don't want to put data in the cell. Surely its not hard to not do something you don't want to do 😉

 

Perhaps you could explain a little more clearly exactly what you are trying to do. I might be able to give a more sensible answer then.

0 Kudos
Message 7 of 17
(3,661 Views)

Hi drek123,

 

This is Jonas, Application engineer at National Instruments UK. Have you managed to solve your problem yet? You can always post your code on the forum so that we have a better understanding of what you are trying to do and be able to solve your problem more efficiently. Feel free to ask any more questions if needed.

Kind regards,

 

Jonas Laenens

Application Engineer

National Instruments UK

0 Kudos
Message 8 of 17
(3,590 Views)

This is the code, it is a rs232 connextion with a balance, on that balance we put diffrerent sieves, like 2000 micr 1000 micro ...., so the user has to choose wich sieves he is using, for those who are not in use a write a 0 to the table because the sieve is not on the balance.

So we know the total weight of the sieves we are using.

then we put the sieves in use on the balance and take of the balance one by one so on every sieve in use we know the weight of the empty sieve

and the weight with sieve with sample in it. thats why where there is a 0 standing in the table there may not be a weight written.

So we can know how many grams is in every sieve.

I made a digital display ont the frontpanel so the user can follow everything on screen.

I made also switches so the user can choose wich sieve is in use or not

The problem is when we take of a sieve and pres append the data may not be written on a cell where a sieve is not in use.

 

 

0 Kudos
Message 9 of 17
(3,575 Views)

Hi drek,

 

this VI is huge und full of RubeGoldbergs…

 

Could you clean up the VI before discussing other problems?

- There are functions to convert an integer to a boolean array. No need to convert "manually"…

- Use a subVI to convert a digit to your 7-segment-display instead of copying the code several times. Or use clusters. Or an array of clusters and an autoindexing FOR loop…

- Avoid coercion dots.

- Straight wires, from left to right…

- There are (atleast) two Wait functions in your loop, this is pretty senseless…

- Don't hide the label of controls in the block diagram!

- Use an event structure to handle all those UI elements.

- A lot of things to do!

 

On your "core"problem: there is no code in your VI where you try to keep a certain element in the table at a fixed value.

Easy solution: when you don't wnat to change a certain value then you don't have to overwrite it with a new one…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 17
(3,563 Views)