JDRenk
-
Content Count
26 -
Joined
-
Last visited
Posts posted by JDRenk
-
-
How do I save binary data to a file with a fixed header? Like using APPEND for text.
-
Got it:
Tools-->Manage Platforms-->Additional Options-->Teechart Standard
-
Is there no TChart component in 10.4 Community Edition??
-
Thanks all, enough said... XP is replaced.
-
I am using the FTDI chip, FT4232.
-
No, I'm not doing any Bluetooth. But, I am using the Winsoft version ComPort. How do I find out if that's calling it?
-
Yes, XP must go away!
- 1
-
I am using TComPort
-
I don't have that answer. I am using Delphi to create an App to log data through USB. I am not an experienced programmer.
-
The error is:
The procedure entry point SetupDiGetDevicePropertyW could not be located in the dynamic link library SetupAPI.dll
-
It looks like XP doesn't support SetupDiGetDevicePropertyW. Any thoughts?
-
I have created an App with Delphi 10.4 and Windows 10. Will I be able to run the App on Windows XP??
-
All sensors are working and I'm logging data! I would like to display live data trends and see TChart should do that, but I can't find it. Is it not available in the Community Edition 10.4?
-
Thanks again. That code works in converting to a string, although I am getting what seem to be random memory errors.
-
Thanks, but I don't quite understand how to apply that. I'm new to this.
This is my procedure:
procedure TForm2.ComPort3RxChar(Sender: TObject);
var
Buffer3 : array[0..14] of Byte;
Result3: array[0..3] of byte;
begin
ComPort3.Read(@Buffer3,15);
Move(Buffer3[7],Result3,4);
end;Result3 is the float32_t buffer
I am using Delphi 10.4 Community Edition
-
Thanks, I now have that Com Port and sensor working OK. Now I have another sensor and Com Port that are totally different. This one returns a 4 byte float32_t value. I have the 4 bytes in an array of bytes. How would I convert that to a decimal string?
-
I am aware that the data doesn't come in one read so I delayed the read to allow the buffer to fill and also am using a comport monitor to verify the correct # of bytes. All looks correct.
-
Thank you. Now I'm having success in debugger mode, but when I run without debugger on I get "'$' is not a valid integer value." The result is correct, just the pop up issue. It is coming from the StrToInt because if I change the $ to 0x I get the 0x in the message.
-
This is what I have:
procedure TForm2.ComPort1RxChar(Sender: TObject);
var
A : integer;
Buffer1 : AnsiString;
Result1 : AnsiString;
begin
Buffer1 := ComPort1.ReadAnsiString;
Result1 := Copy(Buffer1,21,8);
A := StrToInt ($Result1);
end;But it is saying StrToInt is overloaded, not sure what that means.
-
I am using Delphi 10.4 Community Edition. I don't believe it has a Systems.AnsiStrings unit. The COPY function seems to work. My next issue is......... Copy gives me an eight character string of a HEX value, (eg. 1289ABEF). How do I convert that to its Integer value (eg. 311012335)?
-
Ok, I have a better handle on this. Since I am getting data back from different sensors via 3 UARTs, I found the best way for all is to read an ANSIString or byte by byte into a buffer. The data contains other information I need to discard. So how would I select characters i->j out of k total? "xxxxxxxxixxxxxxjxxxxxxxxxxk"
Thanks, Jeff
-
Thank you all for your advice. As I said I am new to programming and simply need to understand things better.
-
The A/D only sends 3 bytes at a time. I am looking at WinSoft's ComPort demo to get an idea of what to do.
-
When I use this I get integer values that don't make sense.
procedure TForm2.ComPort4RxChar(Sender: TObject);
var
Text: String;
Result: Integer;
begin
Result := ComPort4.ReadWord;
Text := IntToStr(Result);
Memo2.Text := string(Text);end;
When I use this I get the correct ANSI String.
procedure TForm2.ComPort4RxChar(Sender: TObject);
var
Text: AnsiString;
begin
Text := ComPort4.ReadAnsiString;
Memo2.SelText := string(Text);end;
Open File Dialog
in VCL
Posted
I have added the File Menu (from File Menu Template) to my Main Menu along with Open Dialog and Save Dialog and it is not working. I have compared it with working code and it is the same. The difference is under Structure, the File Icons are partially shown which seems to indicate something amiss.
Thanks,
Jeff