Greetings everyone,
I am working on a program (in C#) to interact with multiple GE PLCs and a DL-50 display, for a course at the college I work for. I encountered a very odd behavior from C# that I would like to address. If anyone knows what could be the cause, let me know!
The instruction manual for this device gives you some examples (in chapter 6) on how to transmit strings of information to the display. however, even though I am programming the equivalent code, the display doesn't seem to respond.
For example: one of the sample codes says to turn on the relay on a display with address 150, you have to transmit using BASIC: chr$(150) + chr$(48) + chr$(13). The equivalent code in C# would be: string.concat((char)150, (char)48, (char)13)). The display won't react.
What I found strange is that some examples indicate that, in the end, the whole transmission is done using ASCII; here's where I get confused and I am asking for suggestions: If all control characters, or slave addresses, will eventually be converted to ASCII, how does the display identifies when the input is a control string, and when it's a text string? is there something special on the transmission I am missing from the samples?
Or, if you have any suggested pseudo code (or code ), that would be awesome!
For additional information, this is my setup:
PC: RS-232 ----> 232/485 converter: RS-485 ----> DL-50 Display
Baud Rate: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
Display mode: Simplex, Address 1 (0001). Passes initial tests and 2 LEDs are on in one corner (fixed light, not flashing).
I have a scope measuring the signal received at the display, so the differential wires are correctly installed.
::The original post was in the wrong section ::
I am working on a program (in C#) to interact with multiple GE PLCs and a DL-50 display, for a course at the college I work for. I encountered a very odd behavior from C# that I would like to address. If anyone knows what could be the cause, let me know!
The instruction manual for this device gives you some examples (in chapter 6) on how to transmit strings of information to the display. however, even though I am programming the equivalent code, the display doesn't seem to respond.
For example: one of the sample codes says to turn on the relay on a display with address 150, you have to transmit using BASIC: chr$(150) + chr$(48) + chr$(13). The equivalent code in C# would be: string.concat((char)150, (char)48, (char)13)). The display won't react.
What I found strange is that some examples indicate that, in the end, the whole transmission is done using ASCII; here's where I get confused and I am asking for suggestions: If all control characters, or slave addresses, will eventually be converted to ASCII, how does the display identifies when the input is a control string, and when it's a text string? is there something special on the transmission I am missing from the samples?
Or, if you have any suggested pseudo code (or code ), that would be awesome!
For additional information, this is my setup:
PC: RS-232 ----> 232/485 converter: RS-485 ----> DL-50 Display
Baud Rate: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
Display mode: Simplex, Address 1 (0001). Passes initial tests and 2 LEDs are on in one corner (fixed light, not flashing).
I have a scope measuring the signal received at the display, so the differential wires are correctly installed.
::The original post was in the wrong section ::