Trying to communicate with MAGPOWR Cygnus with Controllogix

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

Ok but if writing directly to the Hex input parameter what would be the Value be?
 
I have it reading the correct parameters Values , I.E. from the 86 parameter directly entering 5600 hex. Problem is I get a error back when trying to read the 548 Parameter, It doesn't like the 224 Hex Value being either 0224 or 2240. also the error comes back looks like this Web_Tension:I.Data[1]16#01f0. It should be equal to parameter you are reading.

Thanks
 
Not 2240. That is 4022 hex which is WELL above the Cygnus address space.
Use 2402.

The parameter ID field in the return (input) message will contain an error code if there is an error in the request. In your case the error code is F001 (after byte swapping). According to the manual, this is an invalid address.

Keith
 
Remember, you are swapping bytes (of hex number pairs) not shifting and padding with zeros. In the case of 0224, the digit pairs are 02 and 24 with 02 being first. If we swap the order of the pairs we get 24 and 02, or 2402. This is why it makes things much easier to do in hex. We can work with pairs of digits and swap them as opposed to trying to do this in decimal.

Keith
 
Remember, you are swapping bytes (of hex number pairs) not shifting and padding with zeros. In the case of 0224, the digit pairs are 02 and 24 with 02 being first. If we swap the order of the pairs we get 24 and 02, or 2402. This is why it makes things much easier to do in hex. We can work with pairs of digits and swap them as opposed to trying to do this in decimal.

Keith

I have been writing directly to the output data in hex. Didn't consider the Byte swap while writing direct, I think I'm understanding it 2402 did come back as good no errors. Will try this when running right now the value is Zero.

Thanks will let you know how it goes.
 
Try and read parameter 511. It will be a non-zero value and should be something you can confirm. it would be a good test in the higher reaches of the address space.

Keith
 
Try and read parameter 511. It will be a non-zero value and should be something you can confirm. it would be a good test in the higher reaches of the address space.

Keith


Yea I entered ff01 direct got back real value of 440.0 I will have to go look but I'm pretty sure that is right.

Thanks
 
Very good. Looks like you're on it.

If you end up looking for other parameters make sure you note the data type. The response ends up in different address locations depending on data type.

Keith
 
Very good. Looks like you're on it.

If you end up looking for other parameters make sure you note the data type. The response ends up in different address locations depending on data type.

Keith



Appreciate all the help Keith it is working and I got a lesson on communication with hex. I can put it in trending now.

Thanks again.
 
Glad to hear it is working.

The big takeaway is endian type. It is always a possible issue when communicating between different processors. We wouldn't have had to do anything in hex if the Cygnus operated on the little endian data format of the ControlLogix operated on big endian. Also, we could have done the byte swap on the address using plc instructions like we did with the data but I thought that would add another layer to this that we didn't need to deal with at the time.

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,092
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,933
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,634
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,724
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,238
Back
Top Bottom