Interroga Posted January 29, 2019 Report Share Posted January 29, 2019 Hi guys. I try use local integer variable in UDFB with inc block, but not work. I know not possible monitoring a value on line, but i connect in function out in the block and not change values outside . The inc function not work in blocks with local variables? Regards Quote Link to comment Share on other sites More sharing options...
ORSO2001 Posted January 29, 2019 Report Share Posted January 29, 2019 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... 1 Quote Link to comment Share on other sites More sharing options...
Interroga Posted February 17, 2019 Author Report Share Posted February 17, 2019 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. Quote Link to comment Share on other sites More sharing options...
hotwires Posted February 17, 2019 Report Share Posted February 17, 2019 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.