|
Post by kokenge on Sept 24, 2009 9:13:18 GMT -5
How do you communicate with RS-232 serial using JavaScript.
Thanks for the help..
|
|
|
Post by Brent on Sept 24, 2009 12:28:43 GMT -5
If it must be in JS, the following thread from another forum may have a workable solution. stackoverflow.com/questions/592099/javascript-interface-with-rs-232-serial-portOther solutions would be to use a different language with support for serial port I/O, such as LB. Carl has mentioned the possibility of such support in RB in the future. Maybe it will appear in the next release, an alpha of which is due to come out momentarily.
|
|
|
Post by kokenge on Sept 24, 2009 13:02:10 GMT -5
Thanks Brent, But already been there and they say I think the others are right - JS is isolated from machine specific stuff
I guess I'm coming to the same conclusion. But thought I'd ask first before I do it using RB. Problem I'm having is that RB's graphics does not have all the features I need. So decided to try the <CANVAS> tag. Canvas commands are in JS. I also need to read a Analog to Digital converter on the Serial COM port. It would be nice to do it all in JS. But I can do it with RB and use SPAN commands to get to the Serial port. I already have this application in LB, but want to go to RB for some web features I need. It one of those projects that needs both Real time and Web. Thanks for the help.
|
|
|
Post by mikeukmid on Sept 24, 2009 14:10:54 GMT -5
..... Problem I'm having is that RB's graphics does not have all the features I need. So decided to try the <CANVAS> tag. Canvas commands are in JS. I also need to read a Analog to Digital converter on the Serial COM port. It would be nice to do it all in JS. But I can do it with RB and use SPAN commands to get to the Serial port. I already have this application in LB, but want to go to RB for some web features I need. It one of those projects that needs both Real time and Web. Thanks for the help. I use a digital I/O + ADC board on a com port too. My LB prog collects data from and controls the I/O board and RB gets the data via a ramdisk. Can I ask, please, how you use <span> to get RB 'see' the com port? And to send/receive on the com port? Thanks, Mike.
|
|
|
Post by kokenge on Sept 24, 2009 14:22:42 GMT -5
Sure Mike, I'm using this. www.starting-point-systems.com/index.htmlIt has software to make it look like a com port. It also has commands you can use in batch - so span works. Because the box can be used various ways, I've standardized on it. I've even used it on a CNC I built and it works. HTH... Dan
|
|
|
Post by mikeukmid on Sept 24, 2009 15:59:30 GMT -5
Thanks Dan, I have a different I/O board (with no batch control) so looks like I'm stuck with existing code for now! But still looking for other methods Mike.
|
|
|
Post by mackrackit on Sept 26, 2009 5:41:37 GMT -5
|
|
Core
Junior Member
Posts: 54
|
Post by Core on Sept 26, 2009 6:58:11 GMT -5
Maybe not in the price range your looking for but there's a company called Control Solutions that makes some nice products. csimn.com/CSI_pages/iboard2.htmlI myself plan on using some of there web servers for a small HVAC project in the near future. I also plan on building an RB site that will pull temperature and alarms from there controllers into a RB website. RunBasic would server as the front end. Respectfully, Core
|
|
|
Post by zoomkat on Oct 9, 2009 0:11:47 GMT -5
Seems most cgi applications make use of stdin and stout to communicate between applications and web servers. One can use Apache and batch files to send info out a serial port via a web gui. To both send and receive serial port info I've made a simple program with freebasic that does the job.
|
|