News:

  • April 30, 2026, 02:49:58 PM

Login with username, password and session length

Author Topic: SECONDARY COMM PORT ON DL06- SEND AND RECIEVE ASCII  (Read 12993 times)

DCLARK_ASC

  • Newbie
  • *
  • Posts: 2
SECONDARY COMM PORT ON DL06- SEND AND RECIEVE ASCII
« on: February 17, 2009, 09:56:56 PM »
AUTOMATION DIRECT CATALOGS SAY THAT THE SECONDARY COMM PORT ON THE DL06 PLC CAN DO ASCII IN OR ASCII OUT BUT NOT BOTH. I HAVE THE DL06 SET TO DO BOTH ON SCALE APPLICATIONS. THE HALF DUPLEX IS A LITTLE SLOWER THAN FULL DUPLEX BUT WORKS FOR MANY APPLICATIONS. SO WHY DOES THE CATALOGS SAY EITHER/OR.





(If you want happiness for an hour-take a nap. If you want happiness for a day-go fishing. If you want happiness for a month-get married. If you want happiness for a year-inherit a fortune. If you want happiness for a lifetime-help someone else.)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: SECONDARY COMM PORT ON DL06- SEND AND RECIEVE ASCII
« Reply #1 on: February 18, 2009, 12:08:48 AM »
It definitely cannot do full duplex from ladder logic.  Half duplex is POSSIBLE, as long as the turn-around time from the remote device from sending to receiving is SLOW enough that the PLC ladder logic scan can switch from a PRINT statement to an AIN instruction.  Both instructions can NOT be active on the same PLC scan (hence the limitation).

So you must detect that the PRINT is finished, then activate the AIN instruction, and I am guessing this could take up to 2 PLC scans (i.e. the port sends the last character just AFTER the SP Active bit was assigned, so it must finish THAT scan, come back around, detect the PRINT is finished, enable AIN on THAT scan, but the hardware isn't hooked until the end of THAT scan???)

We're talking a SINGLE BIT of a SINGLE CHARACTER, not a packet BTW.  So 2 PLC scans (say it's 10ms), that's 20ms, at 9600 baud is a LONG time to possibly miss a single bit of a single character.

If you can control a delay in the response by the remote device, that would be your best bet.

If your rempte device supports Modbus or DirectNET, then you do not need to do your own port protocol control via ladder logic, just utilize the built-in protocol support.

DCLARK_ASC

  • Newbie
  • *
  • Posts: 2
Re: SECONDARY COMM PORT ON DL06- SEND AND RECIEVE ASCII
« Reply #2 on: February 18, 2009, 09:35:06 PM »
THANKS FOR THE INFO.

ON THIS APP. I'M RECIEVING DURING THE SCALE FILLING CYCLE. THE ONLY TIME PRINTV IS USED IS WHILE THE SCALE IS IDLE FOR ZERO AND TARE FUNCTIONS. I DID SEE THAT AD HAS A COPROCESSOR PORT FO-CP128, BUT SEEN SOME BAD FEED BACK ON SOME FORUMS ABOUT IT.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: SECONDARY COMM PORT ON DL06- SEND AND RECIEVE ASCII
« Reply #3 on: February 19, 2009, 08:24:36 AM »
That BASIC copro module is the best solution, but if you can guarantee proper delays as I described, I believe you can get it working via the local port.