Jump to content

Local variables not incrementing


Recommended Posts

hi Interroga,

the local varialbles are "created" and "destroyed" at each PLC cycle...you can't use a local variable to store a value and use this later...you have to use a variable defined in the global scope...or save in a DT this value and recal this value, with the specific function, then if necessary you can upload the value in a local variable and use this to do what you want. 

I don't know which experience that you have but is the same as in C  or C++ or other programs languages...


  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Thanks for your reply, but in rockwell and siemens i create many block and dont have problems. Not easy work with this software, Always create new ways for sames problems. I hope this tool stay better in the future. I have given several suggestions, but few have been incorporated.  User passwords must be valid and renewed within a set period of time in the software.


Link to comment
Share on other sites

UniLogic is NOT = to AB. The sooner I accepted that the easier I could sleep at night. It's a semi-reciprocal relationship: AB can do things UT can NOT and UT can do (probably a greater quantity) of things that AB can NOT.  Pick the tool that best fits your mission (or budget in some cases) and run with it. 

On another note: only one of my suggestions made it into a version UniLogic, only because I could prove it worked with Vision but not with Unistream. Involved MODBUS, a Unistream master, V430 slaves, rs232 radio modems, and no (user definable) serial data timeout. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...