Troubleshooting Data Transfer from N Register N61:131 to N61:147 into Memory Location ST252:0

Question:

I am attempting to transfer data from register N61:131 to N61:147 to memory location ST252:0, but I am encountering difficulties. Each time I try to copy the data, it ends up in a different location in ST252:0,1,2, etc. Can anyone help me figure out what I am doing wrong? Thank you. And by the way, great update!

Top Replies

ST252:0 represents a string data type with two key attributes. ST252:0.LEN denotes the length of the string data in characters, while ST252:0.DATA stores the string data as an array of 41 words (16-bit signed integers). For instance, ST252:0.DATA[0] holds the first character in the upper byte and the second character in the lower byte. Functions like COP or CPW may facilitate the transfer of data from an N-file to a string's .DATA array. However, some users encounter difficulties in implementing this process. Alternatively, the MOV command allows for the transfer of a single value from an N-file to a specific element within the string .DATA array (e.g. MOV N7:1 ST9:2.DATA[3]).

Is ASCII set validation conducted during a Character Oriented Programming (COP) process to ensure that values are within the appropriate range? It would be futile to input the value 65534 into a string without proper validation checks.

To the best of my knowledge, the COP instruction performs a bit-by-bit copy without data validation, utilizing the number of destination registers specified in the COP's length parameter. It is possible to copy data from N7 into the DATA array of a string type, but the appearance may not be optimal unless the data is correctly packed into the N7 array. Each element of the DATA array consists of only 8 bits. Unfortunately, I am unable to access the software at the moment to verify this. On the other hand, the "MOV" instruction is considered to be more efficient as it automatically converts the data type, ensuring the accuracy of the value after the transfer.

What type of Programmable Logic Controller (PLC) are you utilizing? The 1100 and 1400 models vary significantly in this particular aspect.

When working with a SLC 500 5/03 processor, it is important to note that the COP instruction may not function as expected. Instead, consider moving data one word at a time using the MOV instruction. If you encounter errors, refer to this helpful guide from Rockwell Automation for troubleshooting tips (link provided). It is possible to convert data from an Integer (N) file to a String (ST) file, especially if your data is in ASCII format and needs to be displayed in AdvancedHMI software. The C-More software also allows for flexibility in designating data types within registers. Thank you to everyone for the assistance!

It sounds like you might be facing an error related to the addressing. Are you certain that you're referencing the memory location correctly? Try re-evaluating your source and destination pointers to ensure they're verified. Also, make sure your program isn't running any commands that could be altering the memory pointers during the data transfer. I agree, by the way, the update is indeed wonderful!

Hey there! It sounds like the issue could potentially lie in the index you're using while trying to transfer the data. Are you correctly incrementing the destination index? If not, your copy function might be duplicating data into the subsequent memory blocks (ST252:0,1,2...etc). Double-check your transfer code for any misplaced variables or indices possibly governing your memory location. By the way, I agree, the update is great!

More Replies β†’

Streamline Your Asset Management
See How Oxmaint Works!!

βœ…   Work Order Management

βœ…   Asset Tracking

βœ…   Preventive Maintenance

βœ…   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: FAQs:

Answer: 1. Why is the data being transferred from register N61:131 to N61:147 into memory location ST252:0 not ending up in the correct locations? - The data may be ending up in different locations due to a possible error in the data transfer process or addressing.

FAQ: 2. What could be causing the issue of data ending up in different locations in memory?

Answer: - The issue could be related to incorrect addressing, data transfer method, or a technical glitch in the system.

FAQ: 3. How can I troubleshoot the data transfer problem from N61:131 to N61:147 into ST252:0?

Answer: - You can start by verifying the data transfer instructions, ensuring proper addressing, checking for any errors in the data transfer code, and troubleshooting any technical issues that may be affecting the process.

FAQ: 4. Are there any specific steps or guidelines to follow for successful data transfer between registers and memory locations?

Answer: - It is important to double-check the addressing, review the data transfer instructions, validate the data transfer code, and ensure that the data is being transferred correctly to the intended memory locations.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  β†’