Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

dataport 2 weeks 6 days ago #19431

  • Fernando Sandoval
  • Fernando Sandoval's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 56
  • Thank you received: 0
Hi i started with dataport my question is form or dialog show settings configuration ... to let user change setting for serial port...

 

Please Log in or Create an account to join the conversation.

dataport 2 weeks 6 days ago #19432

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1366
  • Thank you received: 215
No yet Sir
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

dataport 2 weeks 6 days ago #19439

  • Fernando Sandoval
  • Fernando Sandoval's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 56
  • Thank you received: 0
How i can assigned values from combobox to dataport

here how i doing and i get error
procedure TFormPortSettings.BtnOkClick(Sender: TObject);
var i:longint;
begin
Sett := TIniFile.Create(cbSerialPort.Text+'.ini');
Sett.WriteString('PORT', 'PORTNAME', cbSerialPort.Text);
Sett.WriteString('PORT', 'BAUDRATE', cbBauderate.Text);
Sett.WriteString('PORT', 'DATABITS', cbdATAbITS.Text);
Sett.WriteString('PORT', 'STOPBITS', cbStopbits.Text);
Sett.WriteString('PORT', 'PARITY', cbParity.Text);
Sett.WriteString('PORT', 'FLOWCONTROL', cbFlowcontrol.Text);
Sett.free;
Formmain.dpSerial.Port := cbSerialPort.Text;
Formmain.dpSerial.BaudRate := StrToIntDef(cbBauderate.Text, StrtoInt(cbBauderate.Text));
Formmain.dpSerial.DataBits := StrToIntDef(cbDataBits.Text, StrtoInt(cbDataBits.Text));
Formmain.dpSerial.StopBits := cbStopBits.Text;
Formmain.dpSerial.Parity := cbParity.text;
Formmain.dpSerial.FlowControl := cbFlowControl.Text;
Formmain.DataPort.Open();
Self.Close;
end;

Compile Project, Target: C:\Users\smcuser\Documents\Typhonapps\TermiData\Terminal.exe: Exit code 1, Errors: 3, Hints: 3
fportsettings.pas(147,48) Error: Incompatible type for arg no. 1: Got "TTranslateString", expected "TSerialStopBits"
DataPortSerial.pas(565,27) Hint: Found declaration: SetStopBits(TSerialStopBits);
fportsettings.pas(148,44) Error: Incompatible type for arg no. 1: Got "TTranslateString", expected "AnsiChar"
DataPortSerial.pas(545,27) Hint: Found declaration: SetParity(AnsiChar);
fportsettings.pas(149,54) Error: Incompatible type for arg no. 1: Got "TTranslateString", expected "TSerialFlowControl"
DataPortSerial.pas(555,27) Hint: Found declaration: SetFlowControl(TSerialFlowControl);

Please Log in or Create an account to join the conversation.

dataport 2 weeks 4 days ago #19442

  • Fernando Sandoval
  • Fernando Sandoval's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 56
  • Thank you received: 0
DataPortSerial is only for ct

Please Log in or Create an account to join the conversation.

  • Page:
  • 1