BrunnerEquipment (Customer) asked a question.

P2-550 ASCII Communication

Hello;

I am trying to configure ASCII communication on my P2-550. To start, I just want to hook the PLC to my computer and communicate via HyperTerm.

 

I have configured the port in the hardware configuration:

Hardware ConfigI have my wiring setup:

 

PLC Tx (4) to Computer Rx (2)

PLC Rx to Computer Tx (3)

PLC Ground (1, 6) to Computer Ground (5)

 

This is my simple program:

Program Rungs 

While keeping TestReceive on (by tag table) I type in a connected hyperterminal session. No data is shown as being received, but the "In Progress" flag is true. I have tried transmitting a <CR> as well as typing the hex code to signal termination of the string. The ASCII In function does not seem to respond.

 

Additionally, I have tried Transmitting, keeping TestReceive off, setting a value in tAG1, and turning on TestTransmit the "complete" tag will turn true but I receive no data. I attached a Counter to the ASCII Out "Complete" Tag, and the value is incrementing as one would expect each time the command is instantiated.

 

I have tried reversing my tx/Rx with no luck. I have also tried the communication port on the Computer with other products via ASCII and am not having issues. Any suggestions?

 

Here is my port config from hyperterminal as well:

image


  • z28z34man (Customer)

    Have you tried doing a loop back test to see if the P-2000 can see what it sent?

  • BrunnerEquipment (Customer)

    I have not. To do that would I just jumper the Rx/Tx on the RS232 connector?

  • Garry (Customer)

    Hi @BrunnerEquipment (Customer)​ 

    Does your computer have a DB9 RS232 port or are you using a USB to RS232 adapter? If you are using an adapter, not all of these will work correctly.

    I would also physically jump out the handshaking bits on the computer end. 4-6 / 7-8

    Just a couple of thoughts.

    Regards,

    Garry

     

    ACC Automation

    https://accautomation.ca/

    Expand Post
  • BrunnerEquipment (Customer)

    Hello Garry;

    I was using a USB connector, but at the recommendation of @z28z34man (Customer)​ I tried doing a loop-back test. I am able to transmit, and I see the transmission by way of oscilloscope. I have Tx/Rx bridged. I have tried with RTS jumped to ground as well as to +5 on the productivity. With all of these configurations, the ASIN block will show in progress, completed (good); and shows no data or character count when I am sending a string by way of ASCII Out. I'm not sure what to try next, I have not found any sample projects of code that show ASCII working.

    Expand Post