Send the binary data via the serial interface

Overview

Send the binary data via the serial interface.

Specification of this example


Behavior
When click the button on MDI Child window, send the binary data via the serial interface (normal).

Screenshot


How to try this example
1.Click the link below, then the folder containing zip file automatically opens.
refFile

2.Right-click and hold on the zip file, and drop it on working window of FJ system, then the demo-tool automatically starts.

3.Click "Start MDI Child Window" button in the program, then MDI Child window will be added to the screen.

4.Click "Re-Measure" button, then system remeasures example image files.
When click the "send data" button on MDI Child window, send the binary data (256 byte data that does one increment from 0 to 255) via the serial interface (normal).

How to implement

Process of UI unit
Public Class VB_SendBinaryDataviaSerialInterface

    Private Sub btnSendData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSendData.Click
        Dim bData(255) As Byte
        Dim ret, cnt As Integer

        '(1)
        For cnt = 0 To 255
            bData(cnt) = cnt
        Next

        ret = FZ_FormBase.FZ_FormBase.SendData("SerialNormal", bData, 256, "", 256)   '(2)
    End Sub
End Class

Explanation
(1)Set the binary data (256 byte data that does one increment from 0 to 255).
(2)Send the binary data via the serial interface (normal).

Source codes

Total source codes can be get from refhere.