取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 20 条)
5,716 次查看
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
2 条消息(共 20 条)
5,707 次查看
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 项奖励
3 条消息(共 20 条)
5,699 次查看

Hi Ravinder,

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

Mike

0 项奖励
4 条消息(共 20 条)
5,697 次查看
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 项奖励
5 条消息(共 20 条)
5,693 次查看
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 项奖励
6 条消息(共 20 条)
5,690 次查看
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 项奖励
7 条消息(共 20 条)
5,683 次查看

Hi Ravinder,

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

Mike

0 项奖励
8 条消息(共 20 条)
5,675 次查看


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 项奖励
9 条消息(共 20 条)
5,670 次查看
Hi Mike,
I'm sending one VI which resembles my main vi.

Thank you,
Ravinder
0 项奖励
10 条消息(共 20 条)
5,657 次查看