LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for suggestion on mV graph output

Hi again and thanks for the comment,

 

Well, I have not tried to write down a formula for this, however, the implementation logic is simple, once the input hits the threshold then make it reset immodestly to reset values and make a static input for a few seconds, and then again produce the input and produce the same behavior.  

might be this will help you to understand,

sam67_0-1638349555939.png

 

 

 

0 Kudos
Message 11 of 19
(1,455 Views)

Hi sam,

 


@sam67 wrote:

Well, I have not tried to write down a formula for this, however, the implementation logic is simple


And because the logic is simple you aren't able to produce the expected results...

 

Please write down the formula you want to implement in your VI, and write down the other "side conditions" in some kind of pseudocode!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 19
(1,452 Views)

Hi,

 

Agreed, if it seems easy then might be already solved but as mentioned earlier the same methodology works fine. with Y-Axis (positive voltage) values but when I just tried to change the Y-Axis values to mV values or negative its stuck on static might be the negative values are so small as you mentioned but definitely, there is some implementation lake into the implementation as well. 

 

 

Here is the pseudocode of the algorithm, 

 

# Set parameters
  V_th, V_reset   = pars['-55*mV'], pars['-75*mV']
  tau_m, c_m, g_L = pars['10*ms'] , pars['0.2*nF'], pars['c_m/tau']
  V_init, E_L     = pars['-75*mV'], pars['-75*mV']
t_static = pars['10*ms']
  # Initialize voltage
  V[0] = V_init 

While (True):
If V >= V_th:
V = V_reset
V = t_static

 

However, the other terms which are mentioned in the differential equation with required values are also mentioned above.

 

Hope this will help you, 

 

0 Kudos
Message 13 of 19
(1,449 Views)

Hi sam,

 

now only the formula to calculate "V" in the while loop is missing. I repeat: not that differential equation in your image, but the actual formula implemented in your VI!

 

(As far as I remember you forgot the "V[0]=V_init" step in your VI...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 19
(1,446 Views)

Hi again,

 

I think you are looking for this,

 

(-(v-v_rest)*g_l + I(t))/c_m
 
best regards
Sam
0 Kudos
Message 15 of 19
(1,442 Views)

Hi sam,

 


@sam67 wrote:

I think you are looking for this,

(-(v-v_rest)*g_l + I(t))/c_m

And why is there an "e^x" function in your VI?

(Please reread my messages #2 and #6 on "differences between actual implementation and expectations"...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 19
(1,442 Views)

Hi again, 

 

The ex function helps me to generate waves into the chart that's my understanding if I will remove this the chart will not produce the exact results that I am looking. This is included based on some random suggestions. 

 

regarding comment #6, V[0] is the starting point that is already implemented into the VI where V[0] starts from the user-defined reset point values. 

 

and regarding #2: as I mentioned many times based on the calculation with only Voltage or positive values it's right.

 

Could you please try to run a VI with positive or Voltage values and then just change the values of Y-Axis to mV. 

 

Of course, I am looking for your suggestion but your questions help me a lot to understand even my own understanding on this issue but without running a VI I think that will not clear your concern as well.

 

Best regards

Sam 

0 Kudos
Message 17 of 19
(1,434 Views)

Hi sam,

 


@sam67 wrote:

The ex function helps me to generate waves into the chart that's my understanding if I will remove this the chart will not produce the exact results that I am looking.


So there is a mismatch between your expectations and the math/formulas/algorithm in your VI?

 


@sam67 wrote:

Could you please try to run a VI with positive or Voltage values and then just change the values of Y-Axis to mV. 


I repeat: changing the Y axis scaling will NOT change anything to the calculations done in your VI! It will only change which part of the plot will be visible...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 19
(1,421 Views)

Hi again, 

 

As you are continuously referred to the implementation part which I already know and that's the reason I am not receiving the same output which is required and because of failure implementation I am looking for appropriate suggestion not just only referred that the implementation is wrong. 

 

I will keep this question open and look for other people's suggestions that might be helpful for me and others who are following this question. 

 

Best regards

Sam

0 Kudos
Message 19 of 19
(1,419 Views)