I'm currently working on a project utilizing a small Maple PLC, and we need to establish communication with a sensor that operates on RS232 protocol. When I initiate a "Command" to the sensor via my PC using RealTerm software, I receive a response. For instance, sending the sequence 0X02 0X00 0X09 0X00 0XB0 0X01 0X00 0XCA 0X86 prompts the sensor to reply with 02 00 13 00 B0 00 01 04 20 01 50 3E 90 11 E2 7E 02 53 4F upon activation. Now, I'm attempting to transmit this command via the PLC, but I'm encountering some challenges. Here’s what I need help with: In the tag settings: 1. TxData: Should the sequence 02 00 09 00 B0 01 00 CA 86 be formatted as a string? 2. TxData length: With spaces included, does this equate to 26 bytes? In the network settings - Transmit: 1. For the Starting address (TxData), is the byte count 26? 2. Are there specific rules for data transmission? Is a signature necessary? Should there be a start or end of frame? Currently, I only use an ETX frame (1 byte, Frame: D) without STX. 3. I haven't selected the "Checksum Method." In the network settings - Receive: 1. For the start of frame rules, I use "as soon as Byte received". 2. The end of frame is set as ETX (1 byte, Frame: D). In the general network settings: - Response timeout is set to 999. - Byte format is Low Byte - High Byte. Can anyone provide insight into what's correct and what needs adjustment?
To better understand the configuration of RealTerm, we might need to examine its setup in more detail. It seems likely that the data in question is in binary format rather than a string. If it indeed is binary, it will lack spaces. Additionally, we are unsure about the specific PLC (Programmable Logic Controller) you are utilizing...
It sounds like you're making good headway with your PLC and sensor setup! For your TxData, you should definitely format it as a byte array rather than a string; this is more appropriate for RS232 communication. In terms of length, if you're counting bytes of the actual data transmitted (not spaces), you want to confirm that you're sending 10 bytes total. Regarding your transmit settings, yes, 26 bytes typically includes each byte of your command, but ensure that any start or end frame rules you might need are correctly implemented; often, you would need both STX (Start of Text) and ETX (End of Text) for clarity. Since you haven’t selected a checksum method, just ensure that your sensor doesn’t require one for validation; otherwise, you might want to incorporate that too to prevent issues with communication. Overall, your setup seems to be heading in the right direction—just double-check those byte configurations!
It sounds like you’re on the right track, but I’d recommend double-checking the formatting of your TxData; it should typically be an array of bytes rather than a string, so you’d want to remove any spaces. Regarding the TxData length, when you’re counting the bytes, make sure you’re considering that each hexadecimal byte equates to one byte overall, so it should be 13 bytes (not 26). For the starting address, yes, it should match the byte count you determined, which is 13. It's also common to use a start (STX) and end (ETX) frame for clarity in communication, so you might want to include STX at the beginning if that’s how the sensor is expecting data. Also, depending on your protocol, a checksum might be necessary, so double-check the sensor's documentation there. Lastly, your general network settings seem reasonable for the response timeout and byte format, just keep an eye on those small adjustments, and you should make some progress!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: The TxData sequence (e.g., 02 00 09 00 B0 01 00 CA 86) should typically be formatted as a byte array rather than a string. This ensures that each byte is correctly transmitted in its binary form, which is crucial for communication with RS232 protocol devices.
Answer: Answer: The byte count for the TxData sequence should be based on the number of bytes in the sequence, not including spaces. For example, the sequence 02 00 09 00 B0 01 00 CA 86 consists of 9 bytes, not 26.
Answer: Answer: When configuring the Maple PLC for RS232 communication, you need to specify start and end frames according to the protocol requirements. If the sensor communication protocol requires a start of frame (STX) and an end of frame (ETX), both should be configured. In your case, using only an ETX frame might be insufficient if the sensor expects an STX as well.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.