From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding data acquisition with E series

Hi, 

I had previously mentioned in another thread about the error in tasks from NI 6062E (now solved that issue). Now, I am acquiring data but I can not get it in the way I want. In the VI attached, I would first like to acquire "Alpha angle", then go to "Start measurement Alpha" (which is the time period at that angle), then come to "Beta angle" and then proceed to "Start measurement Beta", similarly. So, I pressed "Case selector" which acquires angle and then when I reverted it back to normal, I could not acquire the time period. If I start with time period, I can acquire both, but that way is not useful since the angles need to come first. Kindly suggest me any possible solution or suggestion. Thank you very much in advance for the help and effort!

 

P.S - There are a lot of booleans and the program below isn't that good, so please ignore them. 🙂 

0 Kudos
Message 1 of 4
(1,915 Views)

I have attached the V14 file with this message. Thank you!

0 Kudos
Message 2 of 4
(1,913 Views)

You have a major problem with your code in that you have an event structure with events that are set to lock the front panel until complete buried in a case structure.

 

You also have a while loop that is stopped when you compare two floating point values for equality.  Do you know it can happen that you can have two floating point values that appear to be equal to you and me not truly be equal in the processor?

 

Also the number of levels of while loops, case structures, and sequence structures invites problems with logical flow of the program.  Along with the excessive use of local variables.  Your program should be restructured.  Usually when any kind of sequencing is involved, a state machine architecture is a good first choice.

 

Also read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help

 

PS:  On your front panel "oscillation" should be spelled with 2 L's, and the correct phrase is "torsional stiffness of wire".

0 Kudos
Message 3 of 4
(1,897 Views)

@RavensFan wrote:

You have a major problem with your code in that you have an event structure with events that are set to lock the front panel until complete buried in a case structure.

 

You also have a while loop that is stopped when you compare two floating point values for equality.  Do you know it can happen that you can have two floating point values that appear to be equal to you and me not truly be equal in the processor?

 

Also the number of levels of while loops, case structures, and sequence structures invites problems with logical flow of the program.  Along with the excessive use of local variables.  Your program should be restructured.  Usually when any kind of sequencing is involved, a state machine architecture is a good first choice.

 

Also read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help

 

PS:  On your front panel "oscillation" should be spelled with 2 L's, and the correct phrase is "torsional stiffness of wire".


Hi, actually yes, I did lock the front panel once and stopped the program and restarted. LabVIEW is pretty new to me and I don't have the sufficient time to learn the software entirely due to my thesis period. So I have no idea how to solve that issue and would be grateful if someone suggests any way to make this program work.

 

The cases of 1 axis oscillation and 2 axes oscillation was written by someone 8 years ago and it works fine, so I have no influence over it, but yes I have heard that it is a horrible program. But again, I can't change any of it as my work is just the angle acquisition. If time persists, I will try to reprogram it in a better way, but not sure though.

 

The program was written in Czech and was translated by a non-native english speaker, so I didn't think much about spelling mistakes since I understood the basic terminologies. 

 

If you  can kindly help me with this data acquisition, it would be really helpful since I am really new to LabVIEW and completely on a time crunch. 

 

Thank you!

0 Kudos
Message 4 of 4
(1,868 Views)