Source language: Translate to:

RS232 again!

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

RS232 again!

Postby DaveJ » Wed Jul 23, 2014 1:13 pm

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
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: RS232 again!

Postby Neosoft Support » Thu Jul 24, 2014 11:29 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RS232 again!

Postby DaveJ » Thu Jul 24, 2014 2:01 pm

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
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: RS232 again!

Postby Neosoft Support » Mon Jul 28, 2014 10:42 am

That's really interesting.

If we were to create a plug-in, what do you see as the minimum required command set?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RS232 again!

Postby David de Argentina » Mon Jul 28, 2014 10:59 am

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: RS232 again!

Postby DaveJ » Wed Jul 30, 2014 1:15 pm

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
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: RS232 again!

Postby David de Argentina » Wed Jul 30, 2014 2:23 pm

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
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: RS232 again!

Postby Rodrigo » Thu Sep 04, 2014 7:16 am

I would be interested in that plugin to control inter printers and cash drawers. Are you already working on it?
After the game, the nerd and the ignorant will return to the same box
User avatar
Rodrigo
 
Posts: 29
Joined: Wed May 30, 2012 6:23 am
Location: Chile

Re: RS232 again!

Postby Neosoft Support » Thu Sep 04, 2014 10:27 am

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RS232 again!

Postby Rodrigo » Thu Sep 04, 2014 10:37 am

:( I understand
After the game, the nerd and the ignorant will return to the same box
User avatar
Rodrigo
 
Posts: 29
Joined: Wed May 30, 2012 6:23 am
Location: Chile

Re: RS232 again!

Postby ebear » Sat Oct 04, 2014 7:19 am

Dear Rodrigo,

Please look in the Sub forum Neobook and Hardware Control.

Best regard,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: RS232 again!

Postby ebear » Tue Oct 14, 2014 1:31 am

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
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: RS232 again!

Postby Rodrigo » Tue Oct 14, 2014 6:11 am

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.
After the game, the nerd and the ignorant will return to the same box
User avatar
Rodrigo
 
Posts: 29
Joined: Wed May 30, 2012 6:23 am
Location: Chile


Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 0 guests

cron