A Global Variable doesn't update when run the code

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

A Global Variable doesn't update when run the code

Post by Carmen Garcia »

Hello everybody:


I test my code in wich a global variables update when necessary but in the execution, these global variables doesn't update¡¡¡¡
Seems like the PIC doesn't write them....

I'm so confused and I became sick.....

Thanks you very much
Regards
Carmen Garcia

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: A Global Variable doesn't update when run the code

Post by medelec35 »

Hi Carmen,
You have not given much information to go on.
Can you post a Flowchart that exhibits the issue of global variables not updating please.
Also if you can state the variable names that are not updating.

If I have the target device that you will be referring too, then I can see if I can spot what's going on.
Martin

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: A Global Variable doesn't update when run the code

Post by Carmen Garcia »

Hello Dazz¡¡

The global variables are "Neighbor_T1", "Neighbor_T2" and so on...In this Macro "Anadir_Neighbor_T" these variables must be updated with the local variables "Neigh_Candidato", in the simulation runs ok but with the kit (Multiprogrammer + ZigBee E-Blocks) doesn't.

Thanks you very much
Attachments
CoordinatorV6 Macro - Anadir_Neigh_T.gif
CoordinatorV6 Macro - Anadir_Neigh_T.gif (169.56 KiB) Viewed 5110 times
Carmen Garcia

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: A Global Variable doesn't update when run the code

Post by Carmen Garcia »

Sorry Medelec¡¡¡ I named you Dazz¡¡

Thanks you very much for the help¡

Best Regards
Carmen Garcia

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: A Global Variable doesn't update when run the code

Post by kersing »

When running on the device, do you see "Anadiendo N_T." on the display?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Carmen Garcia
Posts: 59
Joined: Thu Aug 23, 2012 10:37 am
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: A Global Variable doesn't update when run the code

Post by Carmen Garcia »

Yes¡ LCD display this message follow for the Neighbor_T1's content, that must be the Neigh_Candidato's value but this is not the value shown, is a '1' the number shows¡¡¡¡¡

I have looking for this value, in the initialization the global variables take the "0xffff" value...I don't find where this one is, so when the simulation was fine¡¡

:? :? :? :? :? :? :? :? :?

Thanks you very much.
Carmen Garcia

Post Reply