TURCK Register Mapping into RSLOGIX 5000 (Map an 8bit byte starting at INT[0].8)

jake4eng

Member
Join Date
Sep 2016
Location
British Columbia
Posts
9
Hello All!

I am having difficulties mapping register values.

In the TURCK register there are 24 unique register bytes corresponding to different value registers (8bit x 24).

These 24(8bit) bytes were mapped into RSLOGIX 5000 as 12(16bit) INT words ....INT[12] ..

This means there are 2 bytes (2 unique register values) inside each INT word.

WHAT I NEED TO ACHIEVE:

1. (BLUE outline in drawing) Write/Map a value of "32" into byte 7 of the TURCK register so effectively starting at INT[5].8 in RSLOGIX

This will enable the value of CNT1 (encoder count) to be registered in bytes 8-11...

2. (PINK outline in drawing) READ/MAP the values registered in bytes8,9,10 and 11(4x8bits) into a SINGLE 32bit INT value which will tell me the CNT1 value of my encoder.

I am having problems when ever I try to COP a value of 32 (no matter what kind of array it's sourced from) into INT[5].8 & I haven't tried to map/read the values of bytes 8-11





PICTURE

http://forums.mrplc.com/applications/core/interface/file/attachment.php?id=16013


CAN SOMEONE PLEASE HELP EXPLAIN HOW TO ACHIEVE THIS?!

Thanks for your input EVERYONE! :D
 
Check out the Bit Field Distribute instruction (BTD).
Also I think when you add the module to the IO configuration you should have some options on what type of data array you want to map them into.
 
The link you provided shows the input data, so I start there. The encoder counts are stored as a 32 bit value in bytes 8 to 11, that translates to In_Data[4] & In_Data[5]. Use the COP or CPS instruction to copy the values from the In_Data array to your CNT1 tag:

COP In_Data[4] CNT1 1

The source element is the first array element that contains the data that you want to copy, the destination element is a tag of type DINT, the length parameter of the COP/CPS instruction determines how many bytes are copied, take a look at the instruction help to see how it works exactly, but a value of 1 tells the instruction to copy 1 * destination elements byte count -> (1 * 4) bytes.

To enable the counting you're saying that you have to write "32" into byte 7 of the output data. I don't have the output mapping at hand, but I think you could just use something like:

OTE Out_Data[3].13

That would set the 6th bit (Value of 32) of the 7th byte...

Edit:

You mentioned INT[5] as your starting element, depending on your rack configuration you may have to apply an offset to the element references.

IOMapping_1.png
 
Last edited:

Similar Topics

I have been Tasked with wiring an i/o link block to an existing machine, and use a few proximity switches and a q4x laser distance sensor to...
Replies
0
Views
419
Hello Experts, I have a Turck Encoder connected to P+F IO Link master communicating over Ethernet/IP with Allen Bradley PLC in Studio 5000 v34...
Replies
1
Views
723
When using Turck BL20 analog and Siemens S7 can someone tell me if the scaling in S7 is still 0-27648 (for 0-10vdc/4-20ma) or is it something...
Replies
3
Views
1,840
Good Morning all, I'm wondering if there are any Banner or Turck reps that hang out on this forum. We are (as I'm sure MANY of you are) having...
Replies
2
Views
1,050
Trying to turn Port 1 (C1) into an output port but I am unable to figure it out. Moving a 0 into the port configuration which is IO link without...
Replies
1
Views
1,472
Back
Top Bottom