05-09-2012 06:55 AM - edited 05-09-2012 06:55 AM
Hi danil,
"can we display different values"
Yes, of course! Just wire different values to those indicators. Doh...
05-09-2012 07:04 AM
We have to use another read and write??really?otherwise how it's possible?Please explain it clearly
Why you attached "Doh" here??
05-09-2012 07:16 AM - edited 05-09-2012 07:17 AM
Hi Danil,
I attached "Doh" because you asked obvious questions. As long as you ask obvious questions you will get obvious answers...
It seems you want to display different values in two indicators, but still wired the same value to them. At least it seems so as you didn't attach your VI.
One way would be to use shift registers - you asked for "other possibilities"...
05-09-2012 07:20 AM
I won't yet wired the second indicator.Iam asking whether to use another VISA read and write or there any other possibilities in my attached VI.
05-09-2012 07:26 AM
Hi Danil,
- I don't see any second indicator in your VI...
- You also didn't state where your "2nd value" is coming from.
- I gave you other options.
- You could use a 2nd VISARead too.
- It's all possible as LabVIEW is a programming language. You only have to program what you need/want!
- You really should learn to plan your programming needs. First you should define the goal, then you should try to sketch the way to reach the goal and finally you start to program. I only see the first point ("display 2 values in 2 indicators"), but I still miss the "way"...
05-09-2012 11:30 PM
Hi,
I connected a guage as my second indicator.And the connection is as shown in the attached VI.While running in the highlight execution mode we can clearly see the value changing.But while running normally it shows TimeOut error.Please suggest a better way to avoid this.
05-10-2012 02:03 AM
with some modifications it's working now.
05-10-2012 02:15 AM
Hi danil,
your last solution still misses dataflow!
Why don't you put those Read/Write-operations in a nice chain connected by their VISA ref and error cluster?
Why do you still open and close those ports in each iteration?
You have race-conditions: a port may be closed before the second read/write operation for that port is called.
THINK DATAFLOW!
Go through the basics course as suggested before!
Go through the examples coming with LabVIEW (as suggested before)!
05-10-2012 03:38 AM
I tried in this way.But the second one not working.Iearned the basic data flow programming but can't understand where it is violating in my VI.please help.
05-10-2012 04:50 AM
Hi danil,
"I tried in this way."
You tried the wrong way. Don't run accesses to a single resource in parallel threads!
- You don't need to open a port twice. Do this once before the loop (as often said before).
- You don't need to close a port twice. Do this once after the loop (as said before).
- Obey dataflow, run the read/write functions in a daisy chain with their VISA refs and error clusters (as said before).
"can't understand where it is violating in my VI"
You have parallel access to a single resource. This will never work in a good way.