Reading the CPCL code from device

I Ivan Nevkrytov 3 years 7 months ago
16 2 0

Hello!
 
I'm trying to read cpcl code from a device (X-ray portable spectrometer)The device send the cpcl code via bluetooth to printer.
I don't have a printer, but I don't need it. I need to read the cpcl commands to get some data from device, such as elements concentrations, to make some automation process of sending data to database.
I get sending data into serial monitor on PC as cpcl commands but some commads are not readable. Here they are:
 
! U1 PW 609
! U1 TONE 100
! U1 SETLF 1
! U1 SETLP 7 0 0
! U1 LMARGIN 0
! U1 RY 3
! U1 X 8
g   À                        
g  ÿóÀ          à`            
g  81À          pÀ           À
g  81À          q€           À
g  8 À     8    q€           À0
g  8ÁÁáýàðþ~    s            À0
g  8ÁóïqÙ÷8    v            À0
g  ?ÁÇ9Îsœç8    ìø           þ`
g  8ÁÇùÎsüç8   
Ü           Àaø
g  8ÁÇ Îs€ç8     Ü           Àaø
g  8 Ç Îs€ç8    1Ü           ÀÀ
g  8 Ç™ÎsÌç8    aÜ           ÀÀ
g  81ÃñÎqøç>    ÁÜ           ÀÀ
g  ÿóáãÿøñÿ¼    Àø            €
! U1 RY 2
g  ÿÿÿÿÿÿÿÿþ    ÿþ           ÿÿü
! U1 RY 50
! U1 SETLF 10
! U1 SETLP 7 0 24
! U1 LMARGIN 0
 
These data contain information on the concentration of the element Ni = 10.01 %
Were is it?
The encoding is correct. What's wrong?Thank you for your knowledge!

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

The unreadable data that follows the ! U1 X 8 command looks to be graphic data, more specifically each line is the g CPCL command for Line Print Graphics.

The g section in the CPCL manual on page 185-186 has an example that looks like the CPCL code you provided. The issue is that there are control characters that you need.  When you copied and pasted, you probably lost the Control Characters like .

Hope this helps,
Robin

I Ivan Nevkrytov

Any ideas?
What data follow after ! U1 X 8It's graphics data or what? Help please, it's very important for me..

CONTACT
Can’t find what you’re looking for?