6/4/2016 12:07 PM | |
Posts: 8 Rating:
|
Hello, I have a system of the CPU 1513-1 PN and CM PtP RS422 / 485 BA. Send_P2P I use to send data to the slave, but the data is not sent to the CM module output (TX led does not light up and listen to the program (com sniffer) data "does not see". Why Send_P2P does not work? TIA Portal V13 SP1 protocol: freeport (ascii) p.s. translated by google) AttachmentCM_test.zip (1690 Downloads) |
Last edited by: U_eb3317a6-3ccd-4812-b34a-57a5ef080e11 at: 6/4/2016 12:11:24 PMLast edited by: U_eb3317a6-3ccd-4812-b34a-57a5ef080e11 at: 6/4/2016 12:13:20 PM |
|
6/4/2016 5:13 PM | |
Posts: 8 Rating:
|
Maybe somebody has an example of the implementation of the master communication with the slave device on the ascii protocol (freeport). I will be very grateful. |
6/5/2016 8:31 AM | |
Joined: 4/28/2015 Last visit: 3/26/2025 Posts: 10837 Rating:
|
Hello, as I cant look to your project (don't have needed update now), can you pls explain what Slave device type is? What communication frames / type you need prepare? |
With best regards... |
|
6/5/2016 9:41 AM | |
Posts: 8 Rating:
|
Slave - remote I / O module with RS-485 interface protocol Modbus RTU / Modbus ASCII. I want to implement the Modbus protocol by freeport. I suppose that if I set a REQ bit, then Send_P2P instruction should be executed and the Tx LED should blink, or Send_P2P should have the status of an error code. But Send_P2P always has the status of 7000. |
6/5/2016 9:47 AM | |
Posts: 5225 Rating:
|
@Duris_I, Here is a PDF of the code if it will help you. w AttachmentCM_Test_OB1.pdf (2339 Downloads) |
This contribution was helpful to
1 thankful Users |
6/5/2016 10:00 AM | |
Posts: 8 Rating:
|
I tried using these instructions, but the situation has not changed. If I'm not mistaken, port_config, send_config and receive_config used when you want to dynamically change the communication parameters. |
This contribution was helpful to
1 thankful Users |
6/5/2016 10:12 AM | |
Posts: 5225 Rating:
|
What you say makes sense. I have had a look a sample code published on the forum using S7-1200 linking to HyperTerminal. There also the port configuration is not done. Unluckily those have a definite split between send and receive. What I do see is from the help in the software: What I can tell you is that your code do have an overlap between the send and the receive. There should be a small gap between those but not an overlap. While EN is triggered to the receive, the port is actively listening to what is said... I hope it makes sense and is helpful. |
This contribution was helpful to
1 thankful Users |
6/5/2016 10:16 AM | |
Joined: 4/28/2015 Last visit: 3/26/2025 Posts: 10837 Rating:
|
Hello friends, thnx William for pdf. Quickly have looked to pdf, in my opinion better will be for first check SEND functionality without wired connection to partner (unplug cable to Slave), simply also drive that communication with bit memory, also in SEND instruction, not use clock memory now. So on REQ define your new bit memory %MX.X as you need. Simply via Watch table you can turn it ON and after success TX light on (watch carefuly for that), reset that REQ memory (also you can implement this RESET programmatically after succes DONE). I will be not use that SEND instruction - DONE memory "send_done" as start bit for RECV instruction. Simply I'll be also define memory bit for this EN_R input and leave it ON permanently as soon as SEND DONE will be true. Simply after success send, receive must be initiated as soon as possible. This RECV step can be tested with wired connection to partner, but after success test of SEND. Pls skygrabber look carefuly for this, your stauses like DONE, NDR are available with it's val;ues only for one cycle. Make tests and give us info. |
With best regards... |
|
This contribution was helpful to
1 thankful Users |
6/5/2016 10:19 AM | |
Joined: 4/28/2015 Last visit: 3/26/2025 Posts: 10837 Rating:
|
If we can talk about needed Port cfg, it can be done via HW cfg. In some cases it can be change programatically, as you preffer. Update: I just see little difference between Picture and pdf, you've change clock memory from M110.7 to M0.7, did you find some problems with functionality? |
Last edited by: Duris_I at: 6/5/2016 10:37:50 AMLast edited by: Duris_I at: 6/5/2016 10:38:20 AMWith best regards... |
|
6/5/2016 11:04 AM | |
Joined: 4/28/2015 Last visit: 3/26/2025 Posts: 10837 Rating:
|
Hello, probably I found problem, on SEND instruction is buffer defined like: "out".Static_1[0] I think this is problem, better can be point to whole buffer like "out".Static_1 This can be solution for right send with defined bytes length. also on RECV is needed probably this change like on SEND "in".Static_1 |
Last edited by: Duris_I at: 6/5/2016 11:05:04 AMWith best regards... |
|
This contribution was helpful to
2 thankful Users |
We are working on a new user interface with better overview and more relevance.
Follow us on