Page 1 of 1

info calculation icon

Posted: Mon Mar 19, 2018 1:15 pm
by luibra63
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

Re: info calculation icon

Posted: Mon Mar 19, 2018 1:42 pm
by LeighM
It depends what your target platform is and the size of the default int.
Try changing all your variables to longs.

Re: info calculation icon

Posted: Mon Mar 19, 2018 11:02 pm
by luibra63
Thank you LeighM
I changed format variable time 8 bit in Ulong, same dimensions other variable and my card work perfectly.
best regards