AOI or program help creation

Join Date
Mar 2024
Location
Denmark
Posts
12
Hi all, hope you are having a great day,


I am in need of your help to create a AOI or program that does this kind of job:

I have a IO Link Master with 4 ports. In one of these ports with be connected a IO Link device that will control 48 valves.

This device depending on what port is connected it will use word0, word 2 and word 4 of that specific port to open/close the valves bit by bit (48 in total).
What I need to do is to create a program that inside of it if i declare a specific port it will address the move/trigger command to only those bits of that port. Because maybe the other ports will be used by other devices. I tried to do it but when I do it with simple OTE and address bit by bit it will keep the unlatched the bits of other ports too even if i specify the port.

The image is a representation of the 3 words/integers of port no.1 and is the same for the other 3 ports.

Thanks to you all...
 

Attachments

  • MicrosoftTeams-image.jpg
    MicrosoftTeams-image.jpg
    215.8 KB · Views: 29
I believe you can create a parameter of type InOut INT[0], and then add the word where that particular module starts. Within the AOI you can address that parameter with offsets in the array index to reach word 2 and word 4.

You can then use bit masks, but to be honest I think it's a waste of your time. I'd instead have an AOI that controls a valve and link that bit directly to the output that commands the valve. Adding another layer in between, as far as I can see, isn't saving you any work at all.

Unless I misunderstood your problem.
 
I believe you can create a parameter of type InOut INT[0], and then add the word where that particular module starts. Within the AOI you can address that parameter with offsets in the array index to reach word 2 and word 4.

You can then use bit masks, but to be honest I think it's a waste of your time. I'd instead have an AOI that controls a valve and link that bit directly to the output that commands the valve. Adding another layer in between, as far as I can see, isn't saving you any work at all.

Unless I misunderstood your problem.
So basically in an io link master with 4port I will connect a io link slave with 48 valves. The idea is that if the io link device is connected randomly in one of the ports I'll have a AOI ready just choose the port and the bits will operate as desired. The problem being that if I try to do something like this I'll put in the program all the words of all ports and than choose them if that port is called but if you do it with a simple OTE instruction u will be able to control the bits of the port you want
But since for the other ports the OTE will be in "0" state It will keep them like this(unlatched) and it will make my other ports unusable if I connect other devices.

I hope I was clear I am sorry if not..
 
I'm sorry, I didn't understand what you want to do. Is this slave controller being changed from port to port? after commissioning?
No, and I know what you mean why don't you address only the words of the port that you need and let the other ports be, but I am want do create this AOI because I will have the same situation in the future. So basically the AOI will contain all the words of the 4 ports of the master but only use the word of the port declared. When I tried to do so I could control the port desired but at the same time it kept my other ports in a '0' state(which will make these port unusable if I connect other IO link salves on them).

As far as I know there should be a way to do this by setting up a serios of 'and' rules to isolate only the word you're trying to send out, but f*ck easy said than done
 
I'm with @cardosocea, not quite understanding what you want to do.

It sounds like there is a long array of words to be output by the AOI, but for any one instance of (call to) the AOI you want to
  • control the bits in only three of those words,
    • where which three words' bits are changed depends on the port selected for that call, and
  • leave all of the bits in the other words unchanged.
Then there will eventually be other calls to this AOI for another port that changes a different set of three words, for a different port, and leaves the rest of the words as-is i.e. unchanged.

Am I close?
 
Could you show some screenshots of the AOI as you have it, even if it did not work as intended? Most interesting will be the declaration of input, outputs, and internal tags.
 
I'm with @cardosocea, not quite understanding what you want to do.

It sounds like there is a long array of words to be output by the AOI, but for any one instance of (call to) the AOI you want to
  • control the bits in only three of those words,
    • where which three words' bits are changed depends on the port selected for that call, and
  • leave all of the bits in the other words unchanged.
Then there will eventually be other calls to this AOI for another port that changes a different set of three words, for a different port, and leaves the rest of the words as-is i.e. unchanged.

Am I close?
You are not close you are on point my friend !

Long array of INT[87] I think you can see it in the picture attached too. And the explanation below is in fact the case itself
  • control the bits in only three of those words,
    • where which three words' bits are changed depends on the port selected for that call
Then there will eventually be other calls to this AOI for another port that changes a different set of three words, for a different port, and leaves the rest of the words as-is i.e. unchanged. (YES this is exactly the case)

I don't have my laptop with me right know I left it at work but Monday I can show you if u want. In general the first program that I made was a basic move I'll show you something from scratch I hope it is a bit clearer and this sequence will be done for every valve. but other than that I tried some 'bitwise and' and some BTD but no result I am missing something,,
 

Attachments

  • exmpl1.jpg
    exmpl1.jpg
    91.5 KB · Views: 16
That will not work with the instructions evaluated in that arrangement and order (left-to-right), the port-selection EQUs last, and ending with an OTE, because an OTE will always write a value, either a 1 or a 0, and with the XIC first, if the XIC operand's value is 0, then all OTEs on that rung will write 0s.

You could do it with OTLs and OTUs, but that double the number of output instructions and adds XIOs on parallel with the XIC's.

Instead of four branches with EQU instructions on every one of the 48 rungs, which would require coding 192 EQUs, why not use only four rungs, one for each port, that write the indices of the three array elements to AOI-local (-internal) INTs, and then each output valve rung can use no EQUs and a single OTE array[indexN].bitN with no branches. The the 48 (not 192!) OTEs will only write to the current one port's words.
 
That will not work with the instructions evaluated in that arrangement and order (left-to-right), the port-selection EQUs last, and ending with an OTE, because an OTE will always write a value, either a 1 or a 0, and with the XIC first, if the XIC operand's value is 0, then all OTEs on that rung will write 0s.

You could do it with OTLs and OTUs, but that double the number of output instructions and adds XIOs on parallel with the XIC's.

Instead of four branches with EQU instructions on every one of the 48 rungs, which would require coding 192 EQUs, why not use only four rungs, one for each port, that write the indices of the three array elements to AOI-local (-internal) INTs, and then each output valve rung can use no EQUs and a single OTE array[indexN].bitN with no branches. The the 48 (not 192!) OTEs will only write to the current one port's words.
I thought about the OTL and OTU solution but it seemed like a never ending line of rungs and I just didn't try because I hoped there would be a better solution...

Frankly speaking I am not very clear on the solution you are giving if you could illustrate it to me or maybe give a simple example, everything that does not bother you I would really appreciate that :) !!
 
Nahh man the IO Link master works perfectly fine with the CPU it is my brain that is not doing the work in this case, hahaha
Is it a 1734 with the 5069?

5069 has no native I/O link capability. At least of what I am aware of.

If it's just your brain...

This is just a homework assignment ?.
 
Last edited:

Similar Topics

Hi. I'm learning AOI programming in RSLogix 5000. I created an AOI with several input and output parameters but when I choose the AOI in the main...
Replies
17
Views
3,302
Good Day All, I currently have a request to update an AOI and a shutdown of the place it's to be updated has to be shutdown which is not...
Replies
2
Views
1,857
Hello Everyone, I am using a raC_Opr_NetModbusTCPClient AOI module, as below,. So, I need some assistance to restrict in reducing the poling...
Replies
2
Views
102
I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
226
I am very new to Modbus and the industry, so forgive me if I am missing something obvious. I have known Modbus register addresses coming from a...
Replies
7
Views
252
Back
Top Bottom