Afternoon all,
I'm using TIA Portal V12 SP1 to program a Siemens S7-1200 (Part No. 212 1AE31-0XB0) to control a Siemens Sinamics G120 (Part No. 6SL3210-1KE23-8AF1) over ProfiNet. I also have a small KP300 (Part No. 6AV6 647-0AH11-3AX0) which is used to define a speed setpoint which will be sent to the drive.
I've assigned the PLC an IP Address of 192.168.0.1, and the G120 an IP Address of 192.168.0.3 and a ProfiNet Device No1. I set the Cyclic Data Exchange to "Siemens Telegram 352" in the configuration, which sends 6 words to the device, and receives 6 words back.
I found a manual online that says to use the "RDREC" and "WRREC" instructions to send and receive data to the G120, but I'm struggling to get any comms with the device using these instructions. I've now resorted to just concentrating on reading from the device, but I still don't appear to be reading any data. When I open the "Online & Diagnostic" section for the G120 in TIA Portal, I can view the Control/Status words, which don't match the data what I'm reading back.
Are the RDREC & WRREC the correct instructions to use? Also should I be reading single bits/word individually or the whole Telegram as one "record"?
Thanks in advance, any/all help is greatly received.
I'm using TIA Portal V12 SP1 to program a Siemens S7-1200 (Part No. 212 1AE31-0XB0) to control a Siemens Sinamics G120 (Part No. 6SL3210-1KE23-8AF1) over ProfiNet. I also have a small KP300 (Part No. 6AV6 647-0AH11-3AX0) which is used to define a speed setpoint which will be sent to the drive.
I've assigned the PLC an IP Address of 192.168.0.1, and the G120 an IP Address of 192.168.0.3 and a ProfiNet Device No1. I set the Cyclic Data Exchange to "Siemens Telegram 352" in the configuration, which sends 6 words to the device, and receives 6 words back.
I found a manual online that says to use the "RDREC" and "WRREC" instructions to send and receive data to the G120, but I'm struggling to get any comms with the device using these instructions. I've now resorted to just concentrating on reading from the device, but I still don't appear to be reading any data. When I open the "Online & Diagnostic" section for the G120 in TIA Portal, I can view the Control/Status words, which don't match the data what I'm reading back.
Are the RDREC & WRREC the correct instructions to use? Also should I be reading single bits/word individually or the whole Telegram as one "record"?
Thanks in advance, any/all help is greatly received.