Quantcast
Channel: Allen Bradley / Rockwell Automation Latest Topics
Viewing all articles
Browse latest Browse all 3721

Getting UDT to work with physical IO

$
0
0

Greetings,

I'm here in my home lab trying to acquire a working knowledge of UDT's.  I've had to work with them in the past in large existing programs and they were a pain to track down and find out what IO they were really controlling.  I have a decent understanding of what they are and I've created several to play with here using my softlogix processor and a digital flex IO rack.

My issue starts when i'm trying connect my UDT's to the physical IO.  it looks like I cant use a simple move instruction (which would be way too easy and exactly what I need)  I have a flex IO 8 point output.  Local:1:O.Data[0]

I have a UDT consisting of (see attachment)

Valve001

 Valve001.Out

    Valve001.Out.OPEN

    Valve001.Out.CLOSE

  Valve001.In

    Valve001.In.OPEN

    Valve001.In.CLOSED

I have a copy instruction set to copy Valve001    to Local:1:O.Data[0]     Length 2

that allows the Out.Open and Out.Close UDT's to control bits 0 and 1 of the 8 bit output . .... great.

Now I have another UDT setup to control lighting...

Door

  Door.Out.OPEN

  Door.Out.CLOSE

I want to control bits 2 and 3

I make another copy instruction in a line before the original copy instruction that states Copy Door to Local:1:O.Data[0] Length 4

but i'm really just fighting for the same 2 bits that the valve controls.... how can I control bits 2 and 3 for the door/lighting logic using these UDT's?

 

and that's not yet getting into having physical inputs moved/copied to the UDT input bits.

thanks!!

 

 

UDT1.PNG

UDT2.PNG


Viewing all articles
Browse latest Browse all 3721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>