Hello to everyone,
This is a follow-up of a post I made some time ago. I now want to transfer from a PPS10 running in ‘ONCE’ trigger mode data
over the RS232 interface to a Visual C# (Visual Studio 2005) application. The data are received in the application by a
SerialPort object.
I understand that the PPS10 transmits all data as ‘BA’ packets of total 266 bytes length, of which 10 header parameter bytes
and 256 one-byte voltage values.
I assumed that the PPPS10, when running in ‘ONCE’ trigger mode, once triggered, would produce one scan on the screen and
would simultaneously transmit the scan data as one BA packet over the RS232 interface.
I now observed the following:
- Not all transmitted packets have the said 10 byte parameter header.
- Frequently no data are transmitted at all, since the application’s DataReceived event is not fired.
- The SerialPort object has a data member called BytesToRead. The value of this member is not identical to the length of the
byte array transmitted.
4) The length of the transmitted byte array is not always 266 bytes as required by the BA packet format.
5) The curve obtainable from a properly transmitted BA packet does often not look like the original scan. Sometimes the
transmitted data seem to have undergone at certain points an auto-sensitivity-re-ranging or auto-zero-re-setting, visible as sharp rises in the signal, not visible on the original screen. Sometimes the curve obtained from the transmitted data does not look at all like the original scan.
6) RTS/CTS flow control seems to work, but the “No flow control” recommended by the PPS10 manual does not work.
I assume that some of the above problems are due to a wrong setting in the SerialPort members. Here are some of these members
which I am not sure about what to use:
[ul]DiscardNull: Whether to discard null bytes received on the port before adding to serial buffer (Options: True or
False).[/ul]
[ul]DTREnable: Whether to enable the Data Terminal Ready (DTR) line during communications (Options: True or False).[/ul]
[ul]GenerateMember: Indicates if a member variable will be generated for this component (Options: True or False).[/ul]
[ul]Handshake: The handshaking protocol for flow exchange, which can be none (Options: None, XonXoff, RequestToSend or
RequestToSendXonXoff).[/ul]
[ul]ParityReplace: Byte with which to replace bytes replaced with parity errors (Integer value from 0 to 255).[/ul]
[ul]ReadBufferSize: The size of the read buffer in bytes. This is the maximum number of read bytes which can be buffered
(Integer value).[/ul]
[ul]ReadTimeout: The read timeout in Milliseconds (Integer value, -1 seems to indicate InfiniteTimeout).[/ul]
[ul]ReceivedBytesThreshhold: Number of bytes required to be available before the Read event is fired (Integer value).
[/ul]
[ul]RTSEnable: Whether to enable the Request To Send (RTS) line during communications (Options: True or False).[/ul]
[ul]WriteBufferSize: The size of the write buffer in bytes. This is the maximum number of bytes which can be queued for
write (Integer value).[/ul]
[ul]WriteTimeout: The write timeout in milliseconds (Integer value, -1 seems to indicate InfiniteTimeout).[/ul].
Further to the above, the setting of the trigger level in the PPS10 is not understandable according to the manual. It seems
that the trigger level remains fixed at the center of the screen, whereas the voltage level must be shifted vertically with
respect to that fixed trigger level. This will however then affect the vertical position of the scan.
Can someone help me?
Regards from MKMKMK.