Page 1 of 1

help with serial port to text file program

Posted: Sun Mar 01, 2009 3:36 am
by cyberguy
I`m looking to create a program that will record the output of a com port to a text file along with time & date info.

I have a serial weight scale that streams data to a pc - users input the scale reading (from the scale, not the pc) into a sales database - my problem is that users are putting wrong values in therefore paying out big $ to their buddies - if I had access to the actual scale reading at the time of the transaction I could ID the culprits.

Does anyone have any suggestions, sample code, etc. to help me get started? My coding skills are a bit rusty but I can usually tweak existing code OK  


Thanks in advance
Cyberguy   8-)

help with serial port to text file program

Posted: Tue Mar 03, 2009 5:16 pm
by PaPi
Cyberguy wrote:

"I`m looking to create a program that will record the output of a com port to a text file along with time & date info. "

What is your code ? Send it please!

PaPi

help with serial port to text file program

Posted: Tue Mar 03, 2009 5:38 pm
by cyberguy
I haven`t actually started writing it yet - I was hoping someone might have a sample to get me started.  I have the scale working - I can see the data using terminal - I just need to capture that data with a time stamp

Thanks
Cyberguy

help with serial port to text file program

Posted: Thu Jul 30, 2009 10:53 am
by Quartermars
I am new to fnxBasic but I do appreciate the understated richness of the program.
You may want to look at the INP and OUT statements which are great when it comes to the serial port.

Also the OPEN statement can actually start an application, such as notepad.

Just a few hints or at least an educated guess where you can perhaps proceed with your program.

help with serial port to text file program

Posted: Thu Jul 30, 2009 1:18 pm
by PaPi
For "serial port to text" you can use the FILESTREAM object.
dim Input_Port as filestream  ` as source port
dim Output_File as filestream ` as target text file
dim temp as string
.
.
.
and, for input from port com1 :

Input_Port.open("com1:")
.
.
and, read 1 byte from port:

temp=Input.read(1)

and, you can write it to Output_File...

PaPi

help with serial port to text file program

Posted: Sat Sep 15, 2012 4:20 pm
by saqmo
Hi dude...not a big problem be relaxed....leave that scale and me recommendation for you to use digital weight scale which is best forever...and that scale create not problem in your work.

help with serial port to text file program

Posted: Sat Sep 15, 2012 4:40 pm
by saqmo
[quote author=2B312A2D3A2F3D31480 link=1235878564/0#0 date=1235878564]I`m looking to create a program that will record the output of a com port to a text file along with time & date info.

I have a serial weight scale that streams data to a pc - users input the scale reading (from the scale, not the pc) into a sales database - my problem is that users are putting wrong values in therefore paying out big $ to their buddies - if I had access to the actual scale reading at the time of the transaction I could ID the culprits.

Does anyone have any suggestions, sample code, etc. to help me get started? My coding skills are a bit rusty but I can usually tweak existing code OK ?


Thanks in advance
Cyberguy ? 8-)[/quote]
[url=http://www.primescales.net/]Floor Scale[/url]

help with serial port to text file program

Posted: Sun Sep 30, 2012 5:51 am
by saqmo
[quote author=7361716D6F343434000 link=1235878564/6#6 date=1347727220][quote author=2B312A2D3A2F3D31480 link=1235878564/0#0 date=1235878564]I`m looking to create a program that will record the output of a com port to a text file along with time & date info.

I have a serial weight scale that streams data to a pc - users input the scale reading (from the scale, not the pc) into a sales database - my problem is that users are putting wrong values in therefore paying out big $ to their buddies - if I had access to the actual scale reading at the time of the transaction I could ID the culprits.

Does anyone have any suggestions, sample code, etc. to help me get started? My coding skills are a bit rusty but I can usually tweak existing code OK ?


Thanks in advance
Cyberguy ? 8-)[/quote]
[url=http://www.primescales.net/]Floor Scale[/url][/quote]

help with serial port to text file program

Posted: Sun Sep 30, 2012 5:52 am
by saqmo
I have a serial weight scale that streams data to a pc - users input the scale reading (from the scale, not the pc) into a sales database - my problem is that users are putting wrong values in therefore paying out big $ to their buddies - if I had access to the actual scale reading at the time of the transaction I could ID the culprits.

Does anyone have any suggestions, sample code, etc. to help me get started? My coding skills are a bit rusty but I can usually tweak existing code OK ?


//www.primescales.net/

help with serial port to text file program

Posted: Sat Oct 13, 2012 1:59 pm
by saqmo
[quote author=5446564A48131313270 link=1235878564/7#7 date=1348984269][quote author=7361716D6F343434000 link=1235878564/6#6 date=1347727220][quote author=2B312A2D3A2F3D31480 link=1235878564/0#0 date=1235878564]I`m looking to create a program that will record the output of a com port to a text file along with time & date info.

I have a serial weight scale that streams data to a pc - users input the scale reading (from the scale, not the pc) into a sales database - my problem is that users are putting wrong values in therefore paying out big $ to their buddies - if I had access to the actual scale reading at the time of the transaction I could ID the culprits.

Does anyone have any suggestions, sample code, etc. to help me get started? My coding skills are a bit rusty but I can usually tweak existing code OK ?


Thanks in advance
Cyberguy ? 8-)[/quote]
Floor Scale