First off I am new to this site so please let me know if I am posting anything improperly or if there is anything I need to do differently. I have tried to search through the site for an answer but since I have seemed to have stumped other professionals I am not surprised that I did not find any answer right away but will continue to look. If this is listed someplace else please point me in the direction and disregard my question.
I am currently trying to update one of our old RSLogix500 programs to the RSLogix5000. One thing I wanted to make sure to do was to take advantage of all the new programs abilities. Before I get into what I have done and what my question is I wanted to explain what my hardware set up is.
I have an A-B Controllogix 10 slot rack with a 1756L61 processor, on the rest of the rack I have an Ethernet module the 1756ENBT, and a DeviceNet scanner 1756DNB. This rack will be receiving and sending information back to the main computer room over the Ethernet connection. The Devicenet connection will be controlling flex I/O modules and powerflex70 VFD’s.
What I want to do is be able to give every single bit inside of a DINT word a unique name. the reason I want to do this is that I receive a DINT word from the DeviceNet scanner that is controlling the VFD. Instead of having vfd commands .0-.31 I would like to make it vfd.run, vfd.stop, vfd.clr_flt …etc.
what I did not like about our old code is that half of the code is mapping every single bit to an internal bit and wanted avoid miles of code to map a single word. This brings me to my question.
Is there a way to map a DINT word to a UDT of the exact same size except with .run, .stop , .clear_fault instead of vfd.0, vfd.1, vfd.2, vfd.3 …etc?
I have 2 tags 1st is a DINT 32 bit word: ( Local:4:O.Data[3] ) the 2nd is a UDT with 32 BOOL bits to make it the same size as a 32 bit DINT word but not the same type: ( conveyor_name.Input.vfd ). The idea behind the tag name is that for each conveyor I will only have 1 subroutine and 1 tag to create and name using nested UDT’s.
Ex1: (this example does not work because they are not the same data type): using the MOV function
MOV Source ( Local:4:O.Data[3] ), Dest ( conveyor_name.Input.vfd )
Note: The UDT is made of 32 BOOL bit’s which makes the word exactly 4 Bytes long the exact same length as a DINT. The UDT is just not a DINT.
Ex2: (this does work but can make for weird placement of JSR): using the JSR input/output perimeters
JSR routine name ( conveyor_code ), Input per ( Local:4:O.Data[3] )
SBR Input per ( conveyor_name.Input.vfd )
I have tried other functions without any success except the JSR perimeters but it could be I did not set them up correctly. I hope there is a better function than having to use JSR to map all my UDT tags to a DINT. Thank you in advance for any help.
I am currently trying to update one of our old RSLogix500 programs to the RSLogix5000. One thing I wanted to make sure to do was to take advantage of all the new programs abilities. Before I get into what I have done and what my question is I wanted to explain what my hardware set up is.
I have an A-B Controllogix 10 slot rack with a 1756L61 processor, on the rest of the rack I have an Ethernet module the 1756ENBT, and a DeviceNet scanner 1756DNB. This rack will be receiving and sending information back to the main computer room over the Ethernet connection. The Devicenet connection will be controlling flex I/O modules and powerflex70 VFD’s.
What I want to do is be able to give every single bit inside of a DINT word a unique name. the reason I want to do this is that I receive a DINT word from the DeviceNet scanner that is controlling the VFD. Instead of having vfd commands .0-.31 I would like to make it vfd.run, vfd.stop, vfd.clr_flt …etc.
what I did not like about our old code is that half of the code is mapping every single bit to an internal bit and wanted avoid miles of code to map a single word. This brings me to my question.
Is there a way to map a DINT word to a UDT of the exact same size except with .run, .stop , .clear_fault instead of vfd.0, vfd.1, vfd.2, vfd.3 …etc?
I have 2 tags 1st is a DINT 32 bit word: ( Local:4:O.Data[3] ) the 2nd is a UDT with 32 BOOL bits to make it the same size as a 32 bit DINT word but not the same type: ( conveyor_name.Input.vfd ). The idea behind the tag name is that for each conveyor I will only have 1 subroutine and 1 tag to create and name using nested UDT’s.
Ex1: (this example does not work because they are not the same data type): using the MOV function
MOV Source ( Local:4:O.Data[3] ), Dest ( conveyor_name.Input.vfd )
Note: The UDT is made of 32 BOOL bit’s which makes the word exactly 4 Bytes long the exact same length as a DINT. The UDT is just not a DINT.
Ex2: (this does work but can make for weird placement of JSR): using the JSR input/output perimeters
JSR routine name ( conveyor_code ), Input per ( Local:4:O.Data[3] )
SBR Input per ( conveyor_name.Input.vfd )
I have tried other functions without any success except the JSR perimeters but it could be I did not set them up correctly. I hope there is a better function than having to use JSR to map all my UDT tags to a DINT. Thank you in advance for any help.