Powerflex 70 to Controllogix via Devicenet

patrickmoneyy

Lifetime Supporting Member
Join Date
Jan 2023
Location
TN
Posts
25
Something i ran into that has me stumped, hopefully someone can explain.
I have powerflex 70's connected to a L7 cpu using a 1788-en2dn. The drive is configured to communicate Logic command/status, ref/fdbk, and output datalinks A1,A2,B1,B2 for Output current, output power, fault codes, etc.

In RsNetworx all that input data to the EN2DN is mapped to
DINT[1] (cmd,stat,ref,fdbk)
DINT[2] (A1,A2)
DINT[3] (B1,B2)

In the plc program to move from DINT[] to a UDT it uses a copy.
Copy
Source: DINT[1]
Dest: UDT
Length: 1

And somehow DINT[1] DINT[2] and DINT[3] get moved into the UDT.
DINT[2] and DINT[3] dont cross reference to anything, but the data populates into the UDT.

Anyone know whats happening here?
 
Welcome to the forum.
What you are observing is the normal behaviour of the copy command. The copy command copies from the source address, to the destination. The length of data copied is based from the data type of the destination, in your case a UDT. Your UDT will/should be 12 bytes if data. So it will copy in the 3 x DINT's that you see.
 
Welcome to the forum.
What you are observing is the normal behaviour of the copy command. The copy command copies from the source address, to the destination. The length of data copied is based from the data type of the destination, in your case a UDT. Your UDT will/should be 12 bytes if data. So it will copy in the 3 x DINT's that you see.


Thank you so much for clearing that up. I wasn't aware length references destination element. That explains so much.
 
The key is to remember that the .Length parameter of COP and CPS is the number of destination *elements*.

Not the number of bits, bytes, words, double-words, or 32-bit chunks.

UDT data sizes are always multiples of 4 bytes, so when you're copying from a DINT[x] source the data lines up pretty well. The number of source bytes moved will be equal to the number of bytes that make up the UDT, but the length will still be entered as the number of UDT elements.
 
Thank you both for the guidance. Coming back after a weekend and looking at the device net mapping and related UDT in the program after reading your replies it all makes a lot more sense. Much appreciated.
 
The key is to remember that the .Length parameter of COP and CPS is the number of destination *elements*.

Not the number of bits, bytes, words, double-words, or 32-bit chunks.

UDT data sizes are always multiples of 4 bytes, so when you're copying from a DINT[x] source the data lines up pretty well. The number of source bytes moved will be equal to the number of bytes that make up the UDT, but the length will still be entered as the number of UDT elements.
Re-Learned a lesson today messing with the UDT during downtime window. The old UDT was 16 status bits a feedback INT and 3 data link INT.
New drive has 16 Status bits, Feedback DINT , and a data link DINT. Trying to copy from my array to the UDT my feedback was not being copied correctly at all. I'm ASSUMING what's happening is because CLX groups data in 4 bytes there's an implied 16 bools not being used placed right between my status bits and feedback. Had me scratching my head for a minute until I saw that the data type size didn't match the number of elements.
 

Similar Topics

I have an Ethernet/IP connected Powerflex 700 Vector drive. My module defined data includes UserDefined Dints. My question is, where can I look to...
Replies
0
Views
1,655
I have a Controllogix PLC that I currently have communicating to a Powerflex 40P-E. I am able to set the speed of the drive without a problem but...
Replies
2
Views
3,807
i was wondering if anyone could get me started on an application i have involving a controllogix plc and powerflex 70 vfds (with encoders) on...
Replies
8
Views
7,508
I've got a Powerflex 700 that doesn't like to get going in the mornings. This motor will run anywhere from 30 seconds to 5 minutes before it just...
Replies
3
Views
164
So I have a sort of unique situation where I'm wanting to run a PF755 from the IO and over ethernet. Of course, this comes with it's own set of...
Replies
9
Views
265
Back
Top Bottom