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: 

Why is this problem: illogical

Solved!
Go to solution

hi

during  making a simultion for this program that is based on state machine

i note for some input like 0.9 and the center loop 200  that the result of addtion operation  is some  time negative and thier is no negative number in program!!!!!!

why this happen 

 

program+machine chart below

 

 

 

best regards::

 

 

hi ?Q>

Download All
0 Kudos
Message 1 of 2
(1,936 Views)
Solution
Accepted by mangood

You've got a I8 feeding your furtherst right feedback node.  So, that feedback node is forced to an I8, even though you are using I32's veerywhere else.  So, when you are corecring your I32 to an I8, you're getting rollover and the value becomes negative.  Change the init value for that feedback node ot an I32.

0 Kudos
Message 2 of 2
(1,931 Views)