S7 300 Problem with using Chinese signs as a CHAR

salamander

Member
Join Date
Nov 2014
Location
Slovakia
Posts
3
Can somebody help me. I need to use 3 chinese signs (前照灯) as a 3 CHAR in DB. My regional settings in windows are set to chinese also the project in s7 is set to chinese.Language and mnemonics are set to English. When I am using this signs in for example network comments, there is no problem. When i am using this signs in DB as a CHAR type, this signs are automaticly changed to question mark (?). I had read everything about this in S7 help and changed every setting which was mentioned there. Thanks
 
A CHAR is a byte (8 bits).
An S7 CHAR can only contain ASCII character, which do not include asian characters.
A chinese letter is normally a UNICODE character, which is normally 16 bit long (but can also be 32 bit).
So it is totally impossible what you are attempting to do.
* LD beat me to it.
 
i am sending a code by using tcp/ip to the printer (to print a product label) and i need to print this 3 signs (because part will be exported also to asia). The printer prints text which is stored in these bytes (one letter one char) so i am trying to find a solution how to do this.
 
Use bytes instead of chars in the DB, when you know the binary code for the 3 chinese chars enter them in the DB.
 
thanks for the unicode numbers. Now i discovered that the printer can print also the unicode signs. But i must start the unicode with $ sign. Unfortunately in s7 i cannot use single $ as a CHAR and i must use $$ and that should be the reason why the printer cannot accept the code. printer type is hermes a4 maybe somebody did something like this and will give me some advice.
 
Forget using CHARs in the S7 program.
Just use a BYTE or INT, depending on if the printer expects an ASCII or a UNICODE character for the $-sign.
If BYTE, put B#16#24 (24 hex = 36 decimal = ASCII $).
If INT, put 36.
 

Similar Topics

I have been facing problem in establishing communication between two PLCs. I am using Siemens S7-300 PLC and I am using CP343 Lean SIMATIC. NET...
Replies
2
Views
6,049
Hello everyone, One of our machine we use Siemens Cpu315-2dp. And this cpu communicate with 4 Lenze servo drives series 9300 via profibus. Also...
Replies
0
Views
174
Hi.In the S7-300 plc, DB100.DBB10, whose data type is byte, is transferred to db23.dbb10, whose data type is bool, with the move command. This...
Replies
5
Views
789
Hello everyone, friends. The S7-300 315-2PN -DP CPU I'm using gives BF per minute. Actually, PLC was working with 1 Robot - 1 Lumberg IO Module...
Replies
9
Views
3,148
Hi All~ I have a case (designed by my boss But he has left the company) Please refer to the attached picture...
Replies
6
Views
2,376
Back
Top Bottom