LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access individual cluster elements through Python

Hi....
My project has many(500 to 800) controls and indicators which are spread over many individual vis. I wish to control all these vis from a single (main) vi. I am using "call by reference" technique, which is the best way (I hope !!). To handle these controls easily I'm using clusters. I shall control this main vi from Python. I know how to access each individual LabVIEW control terminal from Python. I kept all these control and indicator terminals in side clusters. Now, I'm able to read and write whole cluster at a time, which is not my requirement. I want to read or write only one cluster element at a given time. I tried a lot but I'm unable to work it out. Pls...help me to solve my problem. I have one more doubt, Instead of keeping all controls and indicators in main vi directly, I'm simply merging into clusters. This merging process (into clusters) takes place in individual vis. Is this step increses/decreses complexity of model ?? We want to keep the code as less complex as possible.

Thank you,

Ravinder
0 Kudos
Message 1 of 20
(4,983 Views)
Hi Ravinder,
do you need a way to get the elements in a cluster within LabVIEW? If you have the reference of a cluster you can connect a property node to it, to get the reference of the controls inside the cluster. Is it what you need?
 
Hope it helps.
Mike


Message Edited by MikeS81 on 07-02-2008 11:10 AM
Message 2 of 20
(4,974 Views)
Hi Mike,
Thank you for ur response....
I wish to access cluster elements from Python not from LabVIEW. My idea is to pass the value to an individual cluster element from Python. As I specified in first post, I can only  pass values to whole cluster at a time. I want to pass only one value to one LabVIEW cluster element from Python. I need help to write Python code to access LabVIEW program as I specified.

Thank you,

Ravinder
0 Kudos
Message 3 of 20
(4,966 Views)

Hi Ravinder,

how do you write data into the cluster at the moment? Do you need a LabVIEW vi for it?

Mike

0 Kudos
Message 4 of 20
(4,964 Views)
HI Mike,

I think I'm not explaning my problem correctly. I have many clusters on my vi's front panel (I have provided a sample cluster of my vi). I wish to control my vi (I mean... changing title, instructor or No. of students separately) from a Python program. When I tried from a python code, I was able to change all cluster elements at a time (here Title, instructor and No. of students). But my requirement is to write individual cluster elements separately. I hope I have presented my problem correctly.


Thank you,
Ravinder


P.S: "I don't want to access whole cluster at a time. I need only individual cluster element access from Python"
0 Kudos
Message 5 of 20
(4,960 Views)
Hi Ravinder,
i understand that you use Python. How do you communicate with the vi (the vi with all your cluster)? Do you need another vi for it?
 
Mike
0 Kudos
Message 6 of 20
(4,957 Views)
Hi Mike,

I'm able to communicate directly to required vi from python. I want to pass values to main vi which has clusters. I don't know, If I need another vi. I think my problem is with python code. I need help to write python code to access a cluster element directly.

Thank you,
Ravinder
0 Kudos
Message 7 of 20
(4,950 Views)

Hi Ravinder,

can you upload your main vi? Or a vi with the same functionality?

Mike

0 Kudos
Message 8 of 20
(4,942 Views)


Ravi0709 wrote:
I think my problem is with python code. I need help to write python code to access a cluster element directly.
I m afraid, this is the wrong place to seek for any help to write/fix your Python code.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 9 of 20
(4,937 Views)
Hi Mike,
I'm sending one VI which resembles my main vi.

Thank you,
Ravinder
0 Kudos
Message 10 of 20
(4,924 Views)