07-16-2020 03:51 AM
Hi Team,
I trying to end my project which is going to measure the pulsed parameters of magnetic fields. Everything is done (I guess) but I have problem with one group of measurements. I successfully done the cutting of the original waveform (between cursors) and tranfer it to the second waveform like You can see below:
On first measurements are good, but I don't know how to do correctly on cut (secon one)... whatever I do is the same like on original waveform, I want it to show measurements of this second cut waveform... is it possible?
Thank You,
Mateusz
07-16-2020 04:25 AM
Hi Matipa,
@Matipa wrote:
I trying to end my project which is going to measure the pulsed parameters of magnetic fields. Everything is done (I guess)
No, not at all.
Your VI needs a lot of work to "end the project"…
@Matipa wrote:
On first measurements are good, but I don't know how to do correctly on cut (secon one)... whatever I do is the same like on original waveform, I want it to show measurements of this second cut waveform... is it possible?
Yes, that's possible.
When you want to calculate data from the "cutted" waveform then you need to cut the waveform data (aka get a subset of the data)!
Right now all you do is changing the x axis of that 2nd graph to show just a part of the full waveform…
On your VI: It's a mess!
07-16-2020 04:43 AM
Thank you for your fast answer!
I know it's not perfect but i still learning 😕
Like i thought i change only scale of this original waveform 😕
Can you explain me how to cut the waveform data you told?
07-16-2020 04:55 AM
Hi Matipa,
@Matipa wrote:
Can you explain me how to cut the waveform data you told?
Open the waveform functions palette. There you will find a function to get a subset of a waveform.
(You may look inside this function: in the end it's just an ArraySubset function.)
07-16-2020 05:02 AM
Okay, I will try ofc.
Will you tell me what else can I do to make this program more transparent and done correctly?
07-16-2020 05:09 AM
Hi Matipa,
@Matipa wrote:
Will you tell me what else can I do to make this program more transparent and done correctly?
Implement a statemachine.
Use event structures instead of polling user input at 50Hz loops.
No need for two loops when both handle user input at the same rate.
To summarize: realize a proper structure in your code!
07-16-2020 05:25 AM
I am probably still too little experienced to comprehend everything like this state machine or changes in input, but loops are already changed :).
Thank You