Welcome, Guest
Username: Password: Remember me
Components and Libraries for Networking Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

TDataPort in design w can select stopbits like that stb1,stb1.5,stb2 2 months 2 weeks ago #18614

  • Fernando Sandoval
  • Fernando Sandoval's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 0
How to convert Stopbits to get string what trint to do is save configuration on ini file so when app start open the port automatic when definition save on file but when trie to get stb1 retun Stopbit and get string
here is my fuonction how i can get stb1,stb1.5 to save on ini file configuration
 
function TFormMain.StopBitsToString(Value : TSerialStopBits ): string;
begin
  Result := GetEnumName(typeInfo(TSerialStopBits), Ord(Value));

end;
  

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

TDataPort in design w can select stopbits like that stb1,stb1.5,stb2 2 months 2 weeks ago #18615

  • Matis A.
  • Matis A.'s Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1129
  • Thank you received: 170
type
  TSerialStopBits = (stb1, stb15, stb2);  

To save TSerialStopBits Value
Saved_Integer :=Ord(Value)

to Read TSerialStopBits Value
Value:= TSerialStopBits(Saved_Integer)
 
PilotLogic Core Programmer

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

  • Page:
  • 1