4

I want to integrate a coin acceptor into my Delphi 7 Application. This specific coin acceptor uses the ccTalk protocol.

I've been looking for a ccTalk library which I can use from delphi.

Any of you guys know of any ccTalk libraries out there? Thanks


I think I must use a comport component, here some code

procedure TForm1.Button_OpenClick(Sender: TObject);
begin
  try
    if ComPort.Connected then
      ComPort.Close
    else
      ComPort.Open;
  except
    ShowMessage('Connection error !');
    exit;
  end;

end;

procedure TForm1.Button_SettingsClick(Sender: TObject);
begin
  ComPort.ShowSetupDialog;
end;

procedure TForm1.Button_SendClick(Sender: TObject);
var
  Str: String;
begin
  Str := Edit_Data.Text;
  if NewLine_CB.Checked then
    Str := Str + #13#10;

  try
    ComPort.WriteStr(Str);
  except
    ShowMessage('Comunication error !');
    exit;
  end;

end;

procedure TForm1.ComPortRxChar(Sender: TObject; Count: Integer);
var
  Str: String;
begin
  ComPort.ReadStr(Str, Count);
  Memo.Text := Memo.Text + Str;
end;

If I call Button_SendClick with string "000 000 001 245 010" nothing happens ....

Here's the device protocol manual.

Nikola
  • 14,888
  • 21
  • 101
  • 165
user817057
  • 127
  • 1
  • 11
  • 2
    Is this like 'ccLink'? This is used by Mitsubishi PLC's. – Brian Frost Sep 22 '11 at 13:19
  • 1
    Mmm, I don't know, here cctalk specifics http://en.wikipedia.org/wiki/CcTalk – user817057 Sep 22 '11 at 13:50
  • did you connect the device properly to the serial port? Then you need to open the port properly knowing is number (ex COM3) . I have experience about pc 2 serial communication but i never worked with cctalk – opc0de Sep 23 '11 at 07:46
  • 1
    Yes, device is properly connected. Software attached to the device is working properly and reads the coins inserted. Connecton seems correctly opened on COM3 (method Button_OpenClick does not give any exception) ... problem is only with data transission. – user817057 Sep 23 '11 at 08:05
  • If CCtalk is anything like the other major standard, MDB, it will have some strict timing requirements. When the Coin Acceptor starts up, it will expect regular messages form the controller, possibly every 5ms or so (polling to ask if any cons have been accepted). If it misses a certain number of these, it might decide that here is no controller and go to sleep, waiting to be reset. If you already found a solution, could you please post it, to help others? Thanks – Mawg says reinstate Monica Jun 22 '17 at 09:58
  • [This question](https://stackoverflow.com/questions/41680647/cctalk-coin-acceptor-no-reaction-when-coin-inserted) is useful, and also mentions that you have to poll every 200ms. – Mawg says reinstate Monica Jun 22 '17 at 10:05
  • Did you ever find an answer? – Mawg says reinstate Monica Dec 19 '18 at 09:14
  • See also this discussion: https://sourceforge.net/p/comport/discussion/261328/thread/3b12d708/ – Marc Balmer Mar 28 '20 at 08:16

0 Answers0