VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Realtime sequence executes wrong code

Hello,

 

I have a realtime sequence that doesn't do what it's supposed to. I have created a simple example to demonstrate the problem:

 

2014-10-10 10_51_12-Stimulus Profile Editor.png

AnonymousLocal0 is of type U64. Obviously the if-expression evaluates to true, so I expect that 1 is assigned to Debug01. However, the else-case is executed so Debug01 gets the value 0.

I have assigned the same expression used in the if-statement to Debug02. As expected Debug02 has the value 1 after the sequence completed. 

 

It looks like the if-statement cannot handle 64-Bit operations correctly. If I change the type of AnonymousLocal0 to U32, the sequence works as expected.

 

My VeriStand version is 2012. I have attached the example seqeunce.

 

Regards

Krid

0 Kudos
Message 1 of 6
(5,783 Views)

Hi Krid,

 

this seems like a Bug and could be related to this:

 

How to evaluate 64 bit return code from realtime sequence - Discussion Forums
http://forums.ni.com/t5/NI-VeriStand/How-to-evaluate-64-bit-return-code-from-realtime-sequence/td-p/...

0 Kudos
Message 2 of 6
(5,728 Views)

Hello,

 

I would like to know if this bug still exists in VS 2013 or 2014. This might be a reason to upgrade from 2012.

 

Thanks

Krid

0 Kudos
Message 3 of 6
(5,662 Views)

Hi Krid,

 

this ist still not fixed. Probably in 2015.

 

 

0 Kudos
Message 4 of 6
(5,657 Views)

This is not related to the issue with real-time sequences and 64-bit return values. That issue has nothing to do with the sequences really, but rather with the fact that the ATML results that are generated are not capable of containing 64-bit integers, so the value is coerced.

 

I have reproduced your issue in VeriStand 2014. I filed CAR 501544 regarding this to R&D for further investigation. You can update your logic to explicitly do the logical check instead of implicitly do it to work around this issue.

 

Original: true && (AnonymousLocal0 & 32768)

Workaround: true && (AnonymousLocal0 & 32768 != 0)

Jarrod S.
National Instruments
0 Kudos
Message 5 of 6
(5,631 Views)

Hey Krid, 

 

As Jarrod mentioned in his previous post, this issue should still exist in VeriStand 2014. Is the workaround that he suggested sufficient for your test? If it not, can you please create a service request with our technical support team? From there we can help make sure you have a fix for your system. 

Tim A.
0 Kudos
Message 6 of 6
(5,623 Views)