<< Click to Display Table of Contents > RS-232 |
☒ Set ☒ Get |
|||
---|---|---|---|
DLL Function |
int CCI_Return = ScSetStringValue(int Value_Type, string RS232_String) int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_String) |
||
ASCII Function |
int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_String) string RS232_String = ScCciGetStringValue(int Value_Type) |
||
Description |
Send/Receive an output/input string via the USC RS-232 port. |
||
Value_Type |
Type: int |
ID: |
|
Location: ScComSAMLightClientCtrlValueTypes |
|||
scComSAMLightClientCtrlStringValueTypeRs232OutputString |
2 |
||
RS232_String |
Type: string |
Unit: none |
|
RS-232 output string |
|||
CCI_Return |
Type: int |
||
CCI error number, see error list. |
|||
Notes |
•Only valid for USC cards. •Rs232BaudRate has to be set first. •Rs232Mode has to be set first •Get command returns character, which were sent to the RS-232 input of USC card. It also clears the input buffer. |
||
C# Example: Send RS-232 string "hi":
int CCI_Return = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232OutputString, "hi" ); |
|||
C# Example: Receive RS-232 string:
string RS232_String = ""; int CCI_Return = cci.ScGetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232OutputString, ref RS232_String ); |
Table 350: USC RS-232 Command
☒ Set ☒ Get |
|||
---|---|---|---|
DLL Function |
int CCI_Return = ScSetStringValue(int Value_Type, string RS232_Baud_Rate) int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_Baud_Rate) |
||
ASCII Function |
int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_Baud_Rate) string RS232_Baud_Rate = ScCciGetStringValue(int Value_Type) |
||
Description |
Set or get the baud rate for Rs232OutputString. |
||
Value_Type |
Type: int |
ID: |
|
Location: ScComSAMLightClientCtrlValueTypes |
|||
scComSAMLightClientCtrlStringValueTypeRs232BaudRate |
1 |
||
RS232_Baud_Rate |
Type: string |
Unit: [Hz] |
|
The RS-232 interface supports the following Baud rates: •"2400" •"4800" •"9600" •"19200" •"28800" •"38400" •"57600" •"115200" (USC-2/-3 only) |
|||
CCI_Return |
Type: int |
||
CCI error number, see error list. |
|||
Notes |
- |
||
C# Example: Set RS-232 baud rate to 9600:
int CCI_Return = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232BaudRate, "9600" ); |
|||
C# Example: Get RS-232 baud rate:
string RS232_Baud_Rate = ""; int CCI_Return = cci.ScGetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232BaudRate, ref RS232_Baud_Rate ); |
Table 351: USC RS-232 Baud Rate
☒ Set ☒ Get |
|||
---|---|---|---|
DLL Function |
int CCI_Return = ScSetStringValue(int Value_Type, string RS232_Mode) int CCI_Return = ScGetStringValue(int Value_Type, ref string RS232_Mode) |
||
ASCII Function |
int CCI_Return = ScCciSetStringValue(int Value_Type, string RS232_Mode) string RS232_Mode = ScCciGetStringValue(int Value_Type) |
||
Description |
Set or get the RS-232 mode for Rs232OutputString. |
||
Value_Type |
Type: int |
ID: |
|
Location: ScComSAMLightClientCtrlValueTypes |
|||
scComSAMLightClientCtrlStringValueTypeRs232Mode |
3 |
||
RS232_Mode |
Type: string |
Unit: none |
|
•"0": Parity not used •"1": Parity odd •"2": Parity even •"3": Parity 1 •"4": Parity 0 |
|||
CCI_Return |
Type: int |
||
CCI error number, see error list. |
|||
Notes |
In all modes: •DataLength is set to 8. •StopBits is set to 1. •Flow control is not used. |
||
C# Example: Set RS-232 mode to parity not used:
int CCI_Return = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232Mode, "0" ); |
|||
C# Example: Get RS-232 mode:
string RS232_Mode = ""; int CCI_Return = cci.ScGetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeRs232Mode, ref RS232_Mode ); |
Table 352: USC RS-232 Mode