Trying to communicate with MAGPOWR Cygnus with Controllogix

randy741985

Member
Join Date
Oct 2006
Location
US
Posts
154
Does anyone have experience communicating with the MAGPOWR Cygus Tension Controller thru Ethernet.

I have a Controllogix 1756-L73 PLC Version 30. and I have successfully setup the Anybus card on a Cygnus tension controller to communicate thru ethernet.

I want to read the weight of the Tension, But the documentation that came with the Commkit to communicate with PLC is very vague and tech support at MAGPOWR are no help either.


Thanks
 
I got my hands on a copy of the comm kit manual. What have you tried so far and what have you seen?

Also, a little birdie told me that Endian-ness may be an issue. Have you looked into that?

Keith
 
Here is something for you to try. I am going to talk in terms of input and output instances and offsets in those instances. All values are shown as decimal

In the output instance:

offset 0 this has to be a changing number every time you want a value
offset 1 9218
offset 2 0
All other output values are zero

This should trigger a read of parameter 548, which i believe is actual tension. 9218 is 548 with the bytes swapped This will be a floating point value and will also be byte/word swapped. But there is a tool for that.

Input instance offsets 6 and 7 will contain the actual tension value as an IEEE 32-bit float, but it is byte and word swapped. So try the following:

COP( InputInstance[6], TempDint, 1)
SWPB(TempDint, Reverse, TempDint)
COP(TempDint, TensionReal, 1)

TempDint is a DINT, TensionReal is a REAL. SWPB is Swap Byte and "Reverse" is an operational mode that swaps both bytes and words.

Se how that goes.

Keith
 
I got my hands on a copy of the comm kit manual. What have you tried so far and what have you seen?

Also, a little birdie told me that Endian-ness may be an issue. Have you looked into that?

Keith

I haven't verified this but I think messaging using read, it works on certain reads from particular parameters. I.E. parameters up to 79 seem to be actually getting successful reads, But after that above parameters of 80 it doesn't read. And looking at the manual Parameter 86 is the tension Lbs.


I need to ask what this means. "Also, a little birdie told me that Endian-ness may be an issue. Have you looked into that?"

Thanks
 
Here is something for you to try. I am going to talk in terms of input and output instances and offsets in those instances. All values are shown as decimal

In the output instance:

offset 0 this has to be a changing number every time you want a value
offset 1 9218
offset 2 0
All other output values are zero

This should trigger a read of parameter 548, which i believe is actual tension. 9218 is 548 with the bytes swapped This will be a floating point value and will also be byte/word swapped. But there is a tool for that.

Input instance offsets 6 and 7 will contain the actual tension value as an IEEE 32-bit float, but it is byte and word swapped. So try the following:

COP( InputInstance[6], TempDint, 1)
SWPB(TempDint, Reverse, TempDint)
COP(TempDint, TensionReal, 1)

TempDint is a DINT, TensionReal is a REAL. SWPB is Swap Byte and "Reverse" is an operational mode that swaps both bytes and words.

Se how that goes.

Keith


I will let you know if this works.
 
Parameter 86 is the tension setpoint after taper. It isn't the actual tension.

Take a look at this for a description of Endian-ness:

https://en.wikipedia.org/wiki/Endianness

Basically, this refers to how a processor evaluates the order of bytes in a word, double word or real. If the two sides of a communication link do not evaluate the data with the same Endian-ness the data will be meaningless.

Also, the COP that gets data from the input instance to the DINT should really be a CPS to make sure the two words from the input data are from the same data transfer.

Keith
 
Last edited:
Parameter 86 is the tension setpoint after taper. It isn't the actual tension.

Take a look at this for a description of Endian-ness:

https://en.wikipedia.org/wiki/Endianness

Basically, this refers to how a processor evaluates the order of bytes in a word, double word or real. If the two sides of a communication link do not evaluate the data with the same Endian-ness the data will be meaningless.

Also, the COP that gets data from the input instance to the DINT should really be a CPS to make sure the two words from the input data are from the same data transfer.

Keith

I got you, I did bring up the I/O and was writing directly to the outputs in hex, this was giving me the results I was talking about.
 
OK. So, using parameter 64 as an example, the hex equivalent would be "40" and it would be entered in offset 0 as 4000 hex to read parameter 64. Is that how you were doing it?

Keith
 
Have you had any luck with this?

Keith



Sorry about getting back with you, I have been out. I'm wondering if I need to read parameter 86 Tension. The Hex read parameter value would be 56 with a offset of 0. How would I enter this directly in the input parameter? using hex. It seems it would be 5600?

Thanks
 
Last edited:
The Hex read parameter value would be 56 with a offset of 0. How would I enter this directly in the input parameter? using hex. It seems it would be 5600?

Yea I went ahead put in the Copy,SWPB and Copy. That does work I am getting back the Real # That matches For that parameter which turns out is the SP. But I need the actually Tension from the Load Cell. This looks Like it would be Parameter 548. So 548 in Hex Value is 224, My question is what would the Hex #? I tried 22400 but that is not possible, I get a error value string invalid.

Thanks
 
As I said before, parameter 86 is not the parameter you want if you want to see actual tension. Parameter 86 is the tension command after taper. If you are not using taper it will be equal to the entered tension setpoint. that doesn't mean you can't read it. It just means it won't change in response to what the load cells are seeing.

If you want to read parameter 86, your message contents (output) would be:

Word 0: Increment to next value; Cygnus needs to see a change
Word 1: 5600
Word 2: 0
Word 3: 0
Word 4: 0
Word 5: 0
Word 6: 0
Word 7: 0


The response would be:

Word 0: Whatever you sent above in Word 0
Word 1: 5600
Word 2: 1
Word 3: 0
Word 4: 0
Word 5: 0
Word 6 and 7: Response value

Remember the response value will the an IEEE floating point number with words and bytes swapped. It will mean nothing when you look at it in the input data. You need to swap the bytes around and then copy the INTs to a REAL.

Until you know for sure you have things working you might want to read unsigned shorts so you don't need to worry about all the byte swapping.

Also remember that the Cygnus won't process your output data unless the value in output word 0 changes.

Keith
 
The address number you are looking for is 2402 hex. As you correctly show, 548 dec is 224 hex, or 0224 to fill out the number. Swapping the number pairs gets you 2402.

Keith
 
To add to my previous response, a 16-bit hex value will have four digits ranging between 0-F. You should never have more than four digits in a 16-bit hex number.

Keith
 

Similar Topics

Title summarizes the overview of the problem. I am trying to make AVEVA Edge 2020 and a Schneider TM241CE40R to talk to each other via Modbus...
Replies
18
Views
2,035
Need You help... Trying to setup an communication between two PLC's [1756 L61 & 1756 L72 ] thru ethernet EN2T. first i added the EN2T module in...
Replies
6
Views
1,928
I am still learning this PLC stuff, so yeah this is what I got. PLC's I am swapping: 1)On the side FX3U-80MT/ES, On the front 80MT/ES 2)On the...
Replies
5
Views
2,565
Hi all, Got a new device I'm trying to work out how to communicate with. It came along on Monday morning after 9 months of development inside my...
Replies
19
Views
5,628
Good day, I'm working on a school project where I wanted to comminicate/control my Telemecanique Modicon M340 with your standart PC desktop. So...
Replies
9
Views
5,230
Back
Top Bottom