HI
I have a problem with calculation icons.
in my program I use the long variable "pulse_tot".
in simulation mode the value is always correct, when I program my card its not work.
I know the problem bat not understand.
for example:
pulse_tot=1000*time*6
time is variable with value 2-15
for exaple for time=6
pulse_tot=1000*6*6 = 36000
in simulation mode is OK
but when i program card don't work
if I change:
pulse_tot = 36000
in simulation mode is Ok
when I program card is work
if change and modify 1000 in variable:
variable=1000
pulse_tot=variable*time*6
in simulation mode is Ok
when I program card is work
I don't understund this problem
help me please
thaks
info calculation icon
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: info calculation icon
It depends what your target platform is and the size of the default int.
Try changing all your variables to longs.
Try changing all your variables to longs.
-
- Posts: 36
- Joined: Mon Aug 29, 2016 3:21 pm
- Has thanked: 3 times
- Been thanked: 6 times
- Contact:
Re: info calculation icon
Thank you LeighM
I changed format variable time 8 bit in Ulong, same dimensions other variable and my card work perfectly.
best regards
I changed format variable time 8 bit in Ulong, same dimensions other variable and my card work perfectly.
best regards