LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: How can I change the value of the sampling period during my simulation?

Hii sir,

 I am getting error while performing my program as "Error -2356 occurred at Control & Simulation Loop in Simulation.vi/".

Possible reason(s):

Control Design and Simulation: The sample period (sec) must be either -1 or positive. If the sample period (sec) is positive, the sample skew (sec) must be greater than or equal to 0 and less than the sample period (sec).

 

How can i rectify it?

 

0 Kudos
Message 1 of 13
(3,297 Views)

Hi,

i am trying simulate the coupled tank system using labview. when i tried to run the program it is showing the error as follows.

Error -2356 occurred at Control & Simulation Loop in Simulation.vi/

Possible reason(s):

Control Design and Simulation: The sample period (sec) must be either -1 or positive. If the sample period (sec) is positive, the sample skew (sec) must be greater than or equal to 0 and less than the sample period (sec).

can someone help me out to resolve this. i am attaching my program also.

0 Kudos
Message 2 of 13
(3,292 Views)

Hi Arjun,

 

What period are you using for your control loop? Can you post your code? It is hard for us to troubleshoot the error without seeing the code!

 

-Jordan

0 Kudos
Message 3 of 13
(3,237 Views)

Hi Arjun,

firstly, I would like to let you know that I am no expert in state-space but I took a look at your code and it would seem that the discrete state space VI is actually the VI that is causing the error. Disabling the VI allows your loop to run.

Similarly, writing the state-space numbers directly into the discrete state space configuration seems to work well on my end. This makes me believe that the state space generated is not created created in a way that the discrete state space vi need. 

I also notice that the sample period is missing in the discrete state space configuration when you wire the state space directly from the Matscript node PlantSS.

Hope this helps point you in the right directions
-XS

0 Kudos
Message 4 of 13
(3,208 Views)

Hi,

i am attaching the code. see and help me to solve this.

0 Kudos
Message 5 of 13
(3,213 Views)

It looks like you also posted this question here. Did you try the suggestions on that page?

 

-Jordan

0 Kudos
Message 6 of 13
(3,193 Views)

I tried it but unable to solve it. can you help me out.

0 Kudos
Message 7 of 13
(3,175 Views)

How to incorporate sample period to discrete state-space configuration ?

0 Kudos
Message 8 of 13
(3,176 Views)

Hi Arjun,

 

I am not too sure what values you need for your sampling time, but it could be implemented using the method as illustrated below which builds the sampling time in using clusters. I have tested this on my end and it seems to remove the error. May I get you to try this out and let me know if it works for you?

Capture.JPG

 

 

 

0 Kudos
Message 9 of 13
(3,163 Views)

Hi XueSheng,

what is that properties block in the picture that you have attached? 

0 Kudos
Message 10 of 13
(3,130 Views)