|Examples||Mac & Win||Server||Client||Guides||Statistic||FMM||Blog||Deprecated||Old|
Reads bytes from serial port and returns them as text.
|SerialPort||3.0||✅ Yes||✅ Yes||❌ No||✅ Yes, on macOS and Windows||❌ No|
|PortReference||The reference number of the port. You get this number from SerialPort.Open when you open the port.||$port|
|length||Maximum number of bytes to read.||10|
|Encoding||The text encoding for result.
Default is native.
This function can also handle UTF-16 as well as UTF-16LE and UTF-16BE for little/big endian byte order.
Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ.
Returns text or error message.
DescriptionReads bytes from serial port and returns them as text.
The text returned may be shorter than length bytes.
You may need to put in script pauses between sending a request and reading the response as the other device may need a second to process the request, answer and for the answer to be received.
See also SerialPort.AvailableBytes function.
Read up to 8 bytes and decode them from Windows text encoding into FileMaker:
Read in loop as long as data comes in:
Record weight in predefined field:
- Version 7.3
- Fixed issue with SerialPort.ReadLine being off by one.
- Version 7.0
- MBS Filemaker Plugin, version 4.5pr1
- MBS Filemaker Plugin, version 3.2pr6
- MBS Filemaker Plugin, version 3.2pr3
- Serial Port functions for MBS Filemaker Plugin
This function is free to use.
Created 18th August 2014, last changed 7th November 2023