Jump to content

Recommended Posts

Posted
Hi everybody! After several years at the forum this is my first question to experts: What is the syntax of INDEX_M and OUTEX_M instructions in GX IEC Developer IL? Thanks
Posted
I'm tempted to say "Welcome" Here you are, see attached picture with Ladder, MC, IL and a new MC of that one. The variables are all global to use the same names, and the "OffsetConstant" is of course a constant (required for use in INDEX and OUTEX).
Posted
Hi Kaare_T, Thank you much for the clear and detailed explanation! I have repeated your sample, then modified it according to my task and the code is compiled fine. Please, look the pictures: The next issue is how to add a logical condition to the command sequence, because after compiling I need to get the following code: LD M0MOV K100 Z0MOV K102 V0
Posted
You do not understand me. I've talked about INDEX_M and OUTEX_M, that is controlled by a logical condition. Please, look at the picture below: The code is produced in GX IEC Developer v7.04 with a choosen box of v7.03 compiler in Extras-Option window. The same program code after compilation I need to get using INDEX_M commands in IEC IL.
Posted
I see your point, however: Are you aware that the value of D100 and D102 does not depend on the value of each register?? As your code shows above you will generate a code that generates a constant: "D100 = K100". In other words: No matter what lies inside D100 (the actual value), the value passed to the INDEX function is still K100. In other words: Why do you specify "D100" when you should specify "K100"? I've never seen INDEX and OUTEX with dataregisters as I've always used them for calculating the IN/OUT addresses of A/AnS/Q series intelligent cards, based on a HeadAddress of the card you can determine during compile time the physical address of the specified IO. INDEX/OUTEX are compile time aware instructions and will generate a static code depending on the constants that are put into the instructions. In other words, dynamic (runtime) indexing wont work. So regarding your example: The value in Z0 will always be K100, and the value in V0 will always be K102. So what is your purpose with this program? Could you please explain what you need to do, and which PLC do you use?
Posted (edited)
It's difficult for me to explain by words for what purposes I use these instructions... Certainly, the code, that is created by these instructions, is static. They is used for an fixed settings, then the dynamic selection of addresses is provided with index registers... Will be easier to send you some program examples, of which you could understand, how I use the INDEX_M and OUTEX_M. I'll do it today with a personal message. UPD: All in all, I managed it and got a shortest compiled code Thanks for the help, Kaare! I'll send you the first result... Edited by Inntele
Posted
Hello everybody, This is a next question, connected with programming in IEC IL, when using INDEX_M and OUTEX_M instructions. Can anyone help, how to rewrite correctly the following ladder construction in IEC IL?:

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...