alphaone
-
Posts
39 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by alphaone
-
-
The error comes because you must create the semaphore before using it. Call with NEW on the first call. When wrapping refnums in a functional global, I usually test for a valid refnum before returning it. It automatically takes care of initialyzing on first call. You can then get rid of the NEW case.
So, the semaphore is stored in global and refered by its name, right? i only hold its name and "new" the semaphore when i need it.
-
Hi, the following VI domestrates the LV2G of a semaphore named "test", but the semaphore can't GET .
Is reasonable to use LV2G for semaphore? or something happened here? So strange.
-
Hi, all of the node in LV can be generated in BD? such as "insert array" node?
Thanks.
-
Well if you don't want to wait and do want to poll try using the "VISA Bytes at Serial Port" function to see when there are enough bytes waiting to be input to attempt a read.
You could also setup another asynchronous process (or loop or state) whose job it would be to hang on the read until a complete response were available and then make that response (possibly with a timestamp) available (queue, global, LV2 global, ...) to the rest of your code before going back to wait again.
Yes, this asynchronous process is quite necessary. The seperation of the WRITE and READ can clear and simlify the instruments controlling i think. Thank you for the inspiration.
-
Using GPIB instruments?
If you're working with GPIB based equipment, you can use the event registers if your instrument impliments it correctly.
Alright, thank you, it's what i need:)
-
Set the timeout to a higher value. So your VISA-read will wait a longer time.
To set the timeout go in the palette to Instrument I/O -> VISA -> VISA Advanced. There select VISA Set Timeout.
Didier
yes, that was the way i tried, but i think some poll mechanism will be better~.
i don't find the SCPI command for this yet. Could you have some advice?
-
Hi guys, I use VSA to measure the Channel Power, the average number is setting to 100. I write the ":READ:CHP?" and then execute the "VISA READ", but at this time, the measuring is not finished.
so, the ERROR "Time out" will appear.
How can i judge the measuring is done? I don't want to use "delay" .
Thanks
-
What a strange example...
On my computer, when I start this vi, it never stops and raises the cpu load to 100%. In the meantime I read the whole Info-LV-digest, and now while I write this post the vi is still running and my cpu tells 100% load. Most strange is although the cpu load is at 100%, I don't seem to have any limitation in speed for the other apps.
... I think I'll have to kill this LV-session...
...Update: after 25(!!!) Minutes I finally also got your error. :thumbdown:
Maybe, this is a solution that use "Type Case" to transfered.
Download File:post-2988-1134030669.vi
Download File:post-2988-1134030858.vi
-
Hi, I input a "Numeric" with Unit of "Hz", and output to a "Numeric indicator",the fatal error happened when running. Check the following figures.
And I want use the Numeric control with Unit input into the "Formular Node", but it can't do! Using the Unit would be couraged??
-
alphaone,
I'm sorry, but in Labview, the way you have diagramed it, is the "Basic" equivalent of:
i = 0
j = 0
for k = 1 to 100
next k
input l
if l = 1 then m = j
else m = i
no matter how you cut it, you still get zero, but no matter what you do you have wasted 100 loops getting nowhere...
However, if you want to branch and conditionally decide if you want to go nowhere FAST or nowhere slow, the folowing diagram will get you nowhere at your desired pace.
Download File:post-2931-1133504940.viRegards,
-Pete Liiva
Liiva,
Well, the for loop is just a example as "doing some time-cosuming job", i don't care the result. I mean that I don't hope the useless operation on the useless branch. It's better that the "select node" judges the condition first, then select one branch to operate,just like "Select Structure".
Thanks:)
BR.
-
The following diagram is not efficient, thought we can use "Select Structure", i hope some improvement on "select node" that pre-judge which branch will be executed.
BTW, i hope the "hot-key" for the popup menu on diagram.~~ i like use the keyboard instead of mouse click~.
-
Hi, in the following VI, I can transfer CSG number to String, but fail in transfering String to Number. Is there function to do that?
Thanks :headbang:
-
In Labview is it possible to make transperant lable on the front panel like a watermark in the wrod doc.
how can I do that.
Thanks in advance
Ravi
Or, Tools->Option->Front panel, check the "Use Transparent Name Label".
-
Hi, the following figure shows that difference, when I flatten a constant (32-bit Integer),the type string is same as the document detailed. but, I change it to Control, the type string is also changed! I don't understand the othen data. I can not find help with NI document. What is meaning of this data?
Thanks.
-
Hi, the following figure shows that difference, when I flatten a constant (32-bit Integer),the type string is same as the document detailed. but, I change it to Control, the type string is also changed! I don't understand the othen data. I can not find help with NI document. What is meaning of this data?
Thanks.
-
Hi,Folk.
I think the reason is you don't open the LabVIEW Script function.
add this into your LabVIEW.ini file which is under the LabVIEW directory
yes, i got.
i wanna learn LV Scripting from ABC ,but maybe lack of learning materials.
Do you have some advice?
Thanks.
-
How to create the "block Diagram" refnum? i have no idea about it.
thanks.
-
I have posted info on how to do this here:
Great!i get a hope! :thumbup:
-
If you don't know what the datatype is at design time then you have a significant challenge ahead of you. I've done exactly what you describe using variants for a flexible test system I built, however I used the OpenG variant tools. The OpenG variant tools are really cool! :thumbup: You can do everything you describe. They were created by the one and only jpdrolet . The best part... you don't have to write a single line of code.
Oh,it's a good news! i have already been despaired.Can i download only the Variant Tools of Goop? My comany's network blocks me and i can not user Commander to do it.
Thanks.
-
Why not to use a polymorphic VI, then?
Saludos,
Aitor
Sorry,i am novice to lv.
i havn't learn about Polymorphic yet.
and i don't know how many types will be used.
-
You need to parse and construct data strings and type descriptors. This is not trivial. You might as well use the OpenG tools -- why do you think that you shouldn't use them?
how to construct?use
-
Download OpenG Commander and install the lvdata package. This has tools for variant introspection and manipulation.
Thanks,i have read it. I can use the "typedescriptor" to judge what data type the variant contains. but , how about cluster?? we can see the types contained in a cluster,but we can't create a cluster by the types,at least i can't. because the parameter "type" of "Variant to Data" need a real cluster not a typedescriptor.
Yes, it's easily done looking the descriptors. Time ago, I prepared an evolutioned version of the OpenG method, so if the variant is an array or a cluster, it says what kind of contents has (so the answer is "array of I32" instead just "array", or "array of clusters of string, boolean, refnum", etc).I hope you'll find it useful. Keep in mind is just a VI I did for a particular purpose in a project, it's not really hard-validated. Just works for usual tasks.
Saludos,
Aitor
Thanks,your vi is nice.i can analyse the types contained by a variant. But how to use the type descriptor to create real controls??
-
Download OpenG Commander and install the lvdata package. This has tools for variant introspection and manipulation.
Thank you,but i don't wanna use OpenG in my program, is there another method?
-
Hi,
I wrote a sub VI whose parameter is variant. and i must convert this parameter to normal by "Variant to Data" function. How can i know which type this variant will be?? As the following figure shows,the variant may contain totally different types ,how to set the "type" of "Variant to Data" function as what i need??
SubVIs[]... can't get the VI ref in case structure...
in Calling External Code
Posted
Hi all, I used the property SubVIs[] of diagram ref, but I found the VIs in the case structure can't be gotten~
how to get it?
Thanks~
LV7.1