loading

Add to this Thread


Steven Gentner from United States 11 months
Roland,

We did some testing and while it is possible to get the pipeline up to 200fps its not very stable at that rate since if the PC decides to do something else (like update Windows) that rate will drop drastically and quickly. Its just not quite the right way to get a high speed response rate to serial data.

Instead, you probably want to use an external VBScript that can run in a tight loop or respond to serial interrupts without needing to release control back to a RR processing pipeline. Its really the best way to create a device listener esp. if you need it to be very reactive. While the module in RR is capable of such things its really only meant as a slower interface to send data created from a camera feed. For general purpose systems, its probably best to write more focused scripts.

For example, feeding

"Write a VB Script command line program that listens to a serial port for data and prints the received data."

into ChatGPT produces something you might use to help you get started:

' Create a serial port object
Set serialPort = CreateObject("MSCommLib.MSComm")

' Set serial port properties
serialPort.CommPort = 1
serialPort.Settings = "9600,N,8,1"
serialPort.InputMode = 0 ' Text mode
serialPort.Handshaking = 0 ' None
serialPort.RThreshold = 1 ' Set the number of characters to trigger the OnComm event

' Open the serial port
serialPort.PortOpen = True

' Define the OnComm event handler
Sub serialPort_OnComm
  Dim receivedData
  receivedData = serialPort.Input ' Read the received data

  ' Process the received data here
  WScript.Echo "Received data: " & receivedData
End Sub

' Set the OnComm event handler
serialPort.OnComm = GetRef("serialPort_OnComm")

' Wait for input
WScript.StdIn.ReadLine

' Close the serial port
serialPort.PortOpen = False

Pick Avatar
* Question/Comment - Only <b>, <i>, <u> tags are allowed. All others will be escaped.
Use the tags [image1], [image2], etc. to place the images within your question/comment.
Upload Images (.jpg, .png, .gif) < 300K, robofiles (.robo) or Zip files (.zip) < 300K.

If you have any questions/issues about RoboRealm or image processing this is your chance to ask a question. Your question and any responses will be posted to the forum section of the website for others to read and learn from.

Note that any submission will be considered property of RoboRealm. If you do not wish your images to be displayed as part of the RoboRealm site please do not submit those images. Any submission may be removed from the website at the discretion of RoboRealm personnel.