Thor Hammer

MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Thor Hammer

  • Rank

Profile Information

  • Country United States
  1. CP1E TXD RXD RS485 Send/Rcv Hex Values?

    Not confusing at all. Thank you for the reply. I now completely understand the different data types and how they translate. The attached code is what I last tried in an attempt to communicate with the Chiller. No luck. My boss said I needed to clear the buffer before transmitting my TXD so that's what I did. When I send the TXD the reception complete flag never turns on. And the port ready flag A392.13 flashes repeatedly. Would anyone care to look at my logic and see if anything jumps out at you as being blatantly wrong? I only included the sections in question from my complete program. I emailed Thermofisher and their lead tech said I do indeed need to send the zero's in the hex command string. His email to me: Hi Anthony,   Zero bytes (00) are required by the NC protocol. In the example used below, a total of 8 bytes must be transmitted by the master for this command. Master Sends: CC 00 01 F0 02 00 FA 12   All of the examples use bytes represented in hex as indicated by the letters (A,B,C,D,E and F).  No conversion is necessary.   The checksum is the last byte.  No additional end byte is required.  The chiller knows how long the command is based on the “n-bytes” that is transmitted with each command.   Best regards,   Scott   You can see that in my MOV instructions I have included the zero's where necessary. And in the above command after the F0 you see 02 This is the "n-bytes" field as there are 2 each. FA (00 which has no value but supposedly necessary in the command string) and the checksum value of 12. I assume that is correct.   In order for the checksum to calculate correctly I had to use the MOVD instruction and add up the bytes separately or it would not work. When I test my CS code using the example in the manual the result is correct. At least one thing works!   8262_PLC_V9 SVCS.cxp
  2. CP1E TXD RXD RS485 Send/Rcv Hex Values?

    As of right now my data in consecutive D-Memory locations to send to the chiller over the RS485 line is UINT. So what you are saying is I should change the data type to Channel? Will that make a difference and if so, why? Just curious. Thank you for clarifying and the table. I have that same table printed out on my desk.    
  3. According to the instruction help file for a CP1E; data for TXD and RXD must be in UINT. However the device I am communicating with over RS485 in no protocol mode requires I send it a command string in Hex and Read back in Hex. I am a bit confused and could use some clarification on this. Can I send my data as UINT BCD or will the RS485 option port not recognize that data type? This project is a nightmare. The device I am communicating with is a Thermofisher chiller that has its own proprietary protocol. It states in the manual all data must be sent and received in HEX. Not ASCII. Would appreciate any insight.
  4. Omron CP1E Serial Comms and Checksum Calc

    Thank you for the reply! I spent a lot of time on this yesterday. I have done exactly as you suggested. I created a subroutine for calculating the checksum and then moving that to a DM location at the end of my hex command string. All in consecutive order. I understand the difference in CX-Programmer #. & hex/decimal.  Do I need a start and end code? I think that is optional. Or is it required? Thanks again!
  5. Omron CP1E Serial Comms and Checksum Calc

    Anyone have any input?
  6. Omron CP1E Serial Comms and Checksum Calc

    Oh and if I am not mistaken CX-Protocol does not support CP1E series. Only CP!H. Is that correct?
  7. Omron CP1E Serial Comms and Checksum Calc

    So I have never setup serial communications before. I have learned a lot in my research the past few days but I am new to this so...go easy on me. I have an Omron CP1EN40S1DR-A with built in RS485 port. And an Omron NS series 5" color touch screen. I need to send and receive commands with a Thermoscientific Recirculation/Chiller bath. The communications protocol in the Chiller manual is listed as NC Serial Communications. All data is sent and received in Hex according to the manual. No ASCII conversion allowed or utilized. I believe I would set my PLC to communicate in No Protocol mode but this option is not available in the pull down list on the Serial Options Port tab. I don't know what settings to use. I have been through the CP1E manuals and all it shows is RS232 and Modbus Easy Master. Any help greatly appreciated.   I have started to populate my MOV instructions with the command string in Hex. I am stuck on how to handle the Checksum. The chiller will not send a response without the checksum attached. According to the manual it is a bitwise inversion of the sum of the bytes in the checksum region. I take that value and XOR it with FF hex to get the bitwise inversion value.   Can this be done with simple add instructions in ladder logic? Then perform an XOR? what instruction for that? Even if I can generate my checksum value how do I then add it to my command string? And what do I compare it to? Wish I could just leave it off!   Manual pages attached and  my code so far (Serial_Comm) file. I have a long ways to go. All I want to do in this instance is read alarms, send a value for temp setpoint in 5 recipes and read the current setpoint. Pretty simple, but challenging to implement! NC Serial Thermofisher 2500.pdf 8262_PLC_V5.cxp