Search found 6 matches

by msteffes
Sat Sep 07, 2024 11:42 am
Forum: Coding Questions
Topic: RS485 Sniffer
Replies: 6
Views: 877

Re: RS485 Sniffer

I tried this initially but did not see the benefit of the mutex and semaphore as my code became more complicated. I was advised to use postevent to signal when data was present but that caused problems with the way the main handled UI. I was only using a producer thread at that point and calling the ...
by msteffes
Fri Sep 06, 2024 11:44 pm
Forum: Coding Questions
Topic: RS485 Sniffer
Replies: 6
Views: 877

RS485 Sniffer

Hello All,
I have been working an RS485 tool and have reached a point of frustration. I am not professional programmer but when our software engineering do not have the bandwidth or budget I will pretend to be one. Anyway, I am trying to create a custom sniffer tool to replace an old application ...
by msteffes
Mon Aug 12, 2024 9:06 pm
Forum: Coding Questions
Topic: Thread priority over Main program
Replies: 1
Views: 902

Thread priority over Main program

Hello All,
I am new to working with threads and need to understand better how priority settings affect other tasks.
My project barrows the example code in the help file section for < CreateSemaphore()> It is Producer/consumer code . I have attempted using this approach in an RS485 sniffer program ...
by msteffes
Thu Jun 13, 2024 5:22 pm
Forum: Coding Questions
Topic: Recommended Basic Program Structure
Replies: 1
Views: 655

Recommended Basic Program Structure

Hello All,
I recently purchased PB and am looking forward to learning to use it well.
Where can I find an example of a recommended standard program structure layout/Template for PureBasic.
.
by msteffes
Thu Oct 27, 2022 5:46 pm
Forum: Coding Questions
Topic: Error using Serial com and widow timer
Replies: 7
Views: 1406

Re: Error using Serial com and widow timer

Thanks that worked.
I also tried the string assignment a with a single space > Buffer.s = " " < without the allocation and that worked as well. Using the allocation is more clear.

What I found interesting is you did not directly assign the address as I did.

your code:
Buffer.s = ""
*Buffer ...
by msteffes
Thu Oct 27, 2022 4:54 pm
Forum: Coding Questions
Topic: Error using Serial com and widow timer
Replies: 7
Views: 1406

Error using Serial com and widow timer

Hello All,
Trying to get familiar with the serial comm and streaming input data techniques. I have a feeling I am not understanding ReadSerialPortData(Com, *Buffer,availDat) . Some issue with the buffer and the "Length" parameter in the ReadSerialPortData command.
Receiving error:
ERROR: Overflow in ...