Page 1 of 1

RS232 again!

PostPosted: Wed Jul 23, 2014 1:13 pm
by DaveJ
I have tried to use many ways of talking to com ports via RS232 but never quite got what I needed.
I have however just come across this Java RS232 library and don't know if Neobook will run the script as it requires the inclusion of 'jar' files.
https://code.google.com/p/java-simple-serial-connector/wiki/jSSC_examples

I don't mind learning how to implement it as long as I know in theory it should work. Does anyone know if Neobook will use Java in this way?

Thanks

Dave J

Re: RS232 again!

PostPosted: Thu Jul 24, 2014 11:29 am
by Neosoft Support
NeoBook can run functions written in JavaScript through the Call action. However, this only works with JavaScript not Java.

If there is enough interest we can look into creating a RS232 plug-in.

Re: RS232 again!

PostPosted: Thu Jul 24, 2014 2:01 pm
by DaveJ
Thanks for the reply Dave,
Its interesting that Glendon Turner who created the RS232 plugin some time ago had a conversation with me and I never really took as much interest as I should have. I was too interested in directly interfacing with hardware such as the Velleman devices.
I never realised how many products in the real world use RS232 to communicate even though some disguise themselves as USB devices.
There is now a huge community that produce open source hardware using the Arduino devices. These devices all communicate with RS232 and to interface with a PC need the ability to communicate via serial.
Many 3D printers use RS232 to drive the servos and my need was to read RF ID tags when I realised that the current RS232 plug-in didn't support hex values.

I'm not sure how many Neobook users would like to measure atmospheric pressure, get the temperature or read a GPS device to get the current location but these things are very useful when you see have low cost they are to implement.

I clearly would love Neobook to add RS232 to the list of plugins and I would be happy to pay but I realise that you would need more than just me.

Just as an example, it would cost me less than $5 to create a barometer and display the results in a Neobook program or less than $15 to show location or accurate time to a fraction of a second.
Thanks

Dave J

Re: RS232 again!

PostPosted: Mon Jul 28, 2014 10:42 am
by Neosoft Support
That's really interesting.

If we were to create a plug-in, what do you see as the minimum required command set?

Re: RS232 again!

PostPosted: Mon Jul 28, 2014 10:59 am
by David de Argentina
Hi Davej,

Using NeoThinBasic plugin you have all you need for develop COMMs functions.

Take a look of this:

http://www.thinbasic.com/public/product ... index.html

And see ThinBasic Modules -> COMM

My defaluted cent,
David de Argentina

Re: RS232 again!

PostPosted: Wed Jul 30, 2014 1:15 pm
by DaveJ
Hi Dave,
The commands that were available with the MSCOMM32.OCX were perfect.

Open Port with port,baud,bits,parity,stop,txbuffer,rxbuffer,
Set Threshold to trigger an event on a certain number of bytes in the buffer,
Read buffer and delete bytes that have been read,
Send bytes either as ascii or hex values,
Count bytes in buffer
Clear buffer
Close Port

Most of what Glendon did was fine except for no threshold setting, crashes if there are no bytes in the buffer and reading the buffer didn't clear its content and of course the hex values bit.
If he was still developing it I would guess it would have been a quick fix.

David de Argentina, thanks for the heads up on Thinbasic but not sure if I would be able to create the event trigger. I will however take a look at what can be done with ThinBasic.

Thanks

Dave J

Re: RS232 again!

PostPosted: Wed Jul 30, 2014 2:23 pm
by David de Argentina
David de Argentina, thanks for the heads up on Thinbasic but not sure if I would be able to create the event trigger. I will however take a look at what can be done with ThinBasic.


Using PowerBasic ( or NeoThinBasic) you can do it in two ways:

a) After the TXBuffer, in the same function
b) on a separate thread, to catch any RXBuffer.

Good Luck !
David de Argentina

Re: RS232 again!

PostPosted: Thu Sep 04, 2014 7:16 am
by Rodrigo
I would be interested in that plugin to control inter printers and cash drawers. Are you already working on it?

Re: RS232 again!

PostPosted: Thu Sep 04, 2014 10:27 am
by Neosoft Support
We're not currently working on a plug-in, but considering it. The main problem (other than time) is that we do not have any external hardware for testing which makes development more difficult that it otherwise would be.

Re: RS232 again!

PostPosted: Thu Sep 04, 2014 10:37 am
by Rodrigo
:( I understand

Re: RS232 again!

PostPosted: Sat Oct 04, 2014 7:19 am
by ebear
Dear Rodrigo,

Please look in the Sub forum Neobook and Hardware Control.

Best regard,

Eric

Re: RS232 again!

PostPosted: Tue Oct 14, 2014 1:31 am
by ebear
Dear Rodrigo,

You may already know this, but David Esperalta started to develop a plug-in for serial communication.
It's yet in a Beta stage, but we are now testing. Please see the Neobook and Hardware control forum.

Best regards,

Eric

Re: RS232 again!

PostPosted: Tue Oct 14, 2014 6:11 am
by Rodrigo
ebear wrote:Dear Rodrigo,

You may already know this, but David Esperalta started to develop a plug-in for serial communication.
It's yet in a Beta stage, but we are now testing. Please see the Neobook and Hardware control forum.

Best regards,

Eric


Thank you Eric!, I will be alert.