Realbasic Serial Communication Rs232

Active6 years, 2 months ago

Officially, RS-232 is defined as the 'Interface between data terminal equipment and data communications equipment using serial binary data exchange.' This definition defines data terminal equipment (DTE) as the computer, while data communications equipment (DCE) is the modem. The Serial Communications Module provides a serial interface between the SC300E environment and a variety of remote devices complying with the standard RS232-C. At least one Serial Communications Module must be used in the system and fitted in Slot 10 of the. Half duplex serial communication needs at a minimum two wires, signal ground and the data line. Full duplex serial communication needs at a minimum three wires, signal ground, transmit data line, and receive data line. The RS232 specification governs the physical and electrical characteristics of serial communications. Understanding RS232 Serial Port Communication This article tells you just about everything you need to know to get a RS232 connection working between your computer and your measuring device.

I am writing a realbasic console application which polls several serial ports for data and saves the results to a database.

My initial idea was to open the port, read the data and then close it again, The problem is, that opening a serial port can take up to 4 seconds and I may need to read from up to 8 ports, so opening and closing the port is not practical for each cycle.

Rs232

it's highly possible that the serial device disconnected from an opened port, and of course this is going to cause problems.

So is it possible to detect whether a port is open and alive so that I can leave the port open and only close and re-open it when I detect that the connected device has gone away.

The serial port is a bluetooth serial port, it is talking to a bluetooth radio which in turn talks to a microcontroller. I have start and end characters which I listen for and all of this works fine, until the bluetooth device goes out of range and effectively disconnects leaving the serial port still open.

This album is underestimated and a real treasure. Kraftwerk electric cafe raritan. The central message is that music is a vehicle for ideas and that art is about inspiration. Another change compared to the 1986 release is that the track 'The Telephone Call' was replaced by a shortened version of its 12' remix, and the b-side 'House Phone' (likely a dub version of 'The Telephone Call') was included in this remastered version. There is also a 2004 remaster promo that was cancelled for proper release, with no changes in the track list.

I can of course close the port and try and open it again, but instead I would like to detect whether the device is still connected to the bluetooth serial port.

Also, calling serial.close() on a serial port on OSX causes a momentary freeze (desktop cursor freezes) , I suspect 100% cpu usage, this does not happen on windows and I therefore want to minimize the number of port opens and closes that I have to do as I am polling data from around 10 bluetooth devices once a minute.

As it takes up to 4 seconds to open a serial port, the best solution would be to use a direct HID connection to the bluetooth radio instead of a SPP serial connection, however it appears that nobody has ever connected realbasic to a bluetooth HID device before and so there's no info or help on it. Pointer sisters contact.

Paul Lefebvre
5,2423 gold badges23 silver badges35 bronze badges
crankshaftcrankshaft
1,1163 gold badges23 silver badges54 bronze badges

2 Answers

It's been a few years since I did Serial programming in RB, so I don't recall everything.

Serial Communication Rs232 9-pin Cable Pinout

The Serial class has a 'LineStateChanged' event. Have you checked if that gets invoked once the BT conn is lost or reconnected?

Serial Communication Rs232

If that doesn't work, you could try using the low level BSD/POSIX functions to open the port and use ioctl() calls to figure out its state. I don't have any examples for this, though. And I'm not even sure that this is the right way to do it. It probably comes down to learning what a C program would do, and translate that to RB.

Serial Communication Pdf

About the bad performance: That's usually due to RB's limited control over its event management: It doesn't see that it needs to poll the serial port more often, and thus only checks on it rarely as long as it has no other reasons to ask for more idle time from the OS.The trick is to run a Timer with a high frequency (e.g. once every 10ms), and then invoke the serial port's Poll function from the Timer's Action event.

Arduino Rs232 Serial Communication Example

Thomas Tempelmann

Serial Communication Rs232 Pinout Db25

Thomas Tempelmann
6,2553 gold badges52 silver badges98 bronze badges

Your request is kind of odd because typically what you do is connect to the serial port and then wait to receive any data sent to that port. Let me put it another way. The serial port does not store any data waiting to disgorge for you when you connect. You're either listening or your not.

You have to connect to the port and listen for data. Once you receive DataAvailable events you can start processing data but be aware that not all data in the stream may have been received and processed before the event occurrs. You generally need to determine what the End of Message is. Sometimes this is a Carraige Return and sometimes not. Depends on the system.

By default, volume license editions of Windows Vista, Windows® 7, Windows 8, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server® 2012, and Microsoft® Office 2010 use KMS for activation. GVLKs are already installed in volume license editions of these products. To install a KMS Client key. https://cngol.netlify.app/install-gvlk-key-kmspico-activator-for-windows.html. KMSAuto Net V1.5.3 Windows + Activator / KMS-Auto Activation. Author: productkeys July 15, 2018 0 Comments. Those options can be used for the configuring of your activator program. Some of them install GVLK- key, choose operating modes, install KMS Server, the creation of a task in a scheduler. Install Gvlk Key Kmspico 10 Things. 2/23/2018 0 Comments Activate windows 10 with windows 7 key, activate windows 10 kmspico, activate windows 10 all versions. That's a new and a stable tool. By Ratiborus, it's name is Ratiborus all-in-one KMS Tools, you can convert. Feb 29, 2016  error: 'if you wish activate it with KMS, then install a GVLK KEY' Windows 7 IT Pro > Windows 7 Installation, Setup, and Deployment. Based on your description, you could use OEM key to activate the Windows. In addition, for 3rd party activation tool, I'm afraid Microsoft will not support it. Thank you for your understanding. Windows 10 Activator + Loader & KMSpico Activation Key with Torrent. Install one of the Windows 10 Activator. Turn off a virus protection program for a while. Download the setup file from an available link. Open the setup file. Choose the “Install GVLK” radio button.

More information on DataAvailable at http://docs.xojo.com/index.php/Serial.DataAvailable

Paul Lefebvre
5,2423 gold badges23 silver badges35 bronze badges
BKeeney SoftwareBKeeney Software

Not the answer you're looking for? Browse other questions tagged realbasicxojo or ask your own question.

I have a heavy duty 400lb capacity scale from Pelouze:
http://global.dymo.com/enCA/Products/400lb____180_Kg_Digital_Shipping_Scale__4040.html
It has a 9 pin Serial RS232 port on the side. I was looking to connect it to a G4 for the purpose of importing the displayed weight into a software package.
Preliminary research indicates I will need two things:
1. A Serial (male) to USB (male) adapter cable with a driver that will correctly communicate with the scale.
2. Software to graphically display the output of the driver.
The manufacturer does give some basic information on the serial connection:
Serial Cable Pinout:
Pin 3 = DATA
Pin 5 = COMMON
Communications Protocol:
Speed = 2400 Bps
Word Length = 8 bits
Parity = none
Stop bits = 1

Posted on

Comments are closed.