IO strings and conditions!!!

  • Okay all, either I am insane or ABB wont do the simple things. Am I doing this right? I want to watch conditions of an input but I want that input to change based on a string


    Can I do this......



    sIOname := "PLC_DI80_OrderReq_Cnv"+NumToStr(nCnvNum,0)+"Chute"+NumToStr(nMagNum,0)+"_"+NumToStr(nChuteNum,0);

    IF DInput(sioname)=1 THEN


    ENDIF



    OR....


    If dinput ("PLC_DI80_OrderReq_Cnv"+NumToStr(nCnvNum,0)+"Chute"+NumToStr(nMagNum,0)+"_"+NumToStr(nChuteNum,0))=1 then

    Endif

  • The WHY is because I have over 60 of the inputs and outputs to do. and I hate rewriting and copy and paste. 60 because thats what the PLC guy wanted.


    The thought was. If I could dynamically read I/O and uses a loop or counters. it would be 4 or 5 lines vs 60.. and much easier to make changes if needed.

  • I already wrote a routine to simplify. So the work is already done unfortunately.


    But I was hoping there was an easy way. Still ended up being 120 lines unfortunately. there was more I.O. then I thought.


    The more I read the manual. the more I see its not possible.

  • i wrote this in 10 minutes You have to try and give it better names but it should work like this


    im working with kuka atm and i wished i would be back at an abb. so much possibillities

Advertising from our partners