Jump to content

Recommended Posts

Hi,

 

I 'm new to samba and Visulogic programming, and I'm having some problems to use the samba sm35-j-t20 serial port to send data into a chinese printer(csn-a2-r), it uses rs232...

I initialize the the com with the printer parameters and I configured an protocol, but when I try to send the messages something goes wrong,

The data is not sed correctly, it appears ramdom stuff in the printer.

obs.: the printer is 12vdc so I hacked it with a lm7812 to be able to use it with the same power supply.

 

Someone have done something similar and/or can help please?

here is the link for the printer and i'm attaching  the code for the samba.

https://cdn-shop.adafruit.com/datasheets/CSN-A2+User+Manual.pdf

giga de testes com impressora.vlp

Link to comment
Share on other sites

On 15/9/2016 at 2:45 PM, caio ribeiro said:

Hi,

 

I 'm new to samba and Visulogic programming, and I'm having some problems to use the samba sm35-j-t20 serial port to send data into a chinese printer(csn-a2-r), it uses rs232...

I initialize the the com with the printer parameters and I configured an protocol, but when I try to send the messages something goes wrong,

The data is not sed correctly, it appears ramdom stuff in the printer.

obs.: the printer is 12vdc so I hacked it with a lm7812 to be able to use it with the same power supply.

 

Someone have done something similar and/or can help please?

here is the link for the printer and i'm attaching  the code for the samba.

https://cdn-shop.adafruit.com/datasheets/CSN-A2+User+Manual.pdf

giga de testes com impressora.vlp

First try to establish communication with a comm simulator like hercules, so you can check if the protocol you are using is right. I made one application to write barcodes on Zebra. The key factor was first checking the protocol with hercules then when you know the message is ok, then send using the PLC.

Good luck

Link to comment
Share on other sites

  • MVP 2023

I agree with all that HiTech says, especially on Hercules...a great little program.  Link:   http://www.hw-group.com/products/hercules/index_en.html  I suggest you play with it first to get to know it's fundamentals.

That manual for the printer is quite good, so concentrate on getting simple instructions received ok, like an LF and Full cut, then progress from there.

I have also had serial instances where inversion of lines 2 & 3 are needed despite manufacturer information describing normality/showing nothing about this.  Once it was squirrelled away in troubleshooting...no mention at all in the main connections advice section.  Dumb!  If all else fails, give it a try.  A breakout box makes this easy and is a great tool to have in the kit.

cheers, and again, good luck.  Serial is sometimes a pain!

Aus

  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
On 21/09/2016 at 8:15 PM, Ausman said:

I agree with all that HiTech says, especially on Hercules...a great little program.  Link:   http://www.hw-group.com/products/hercules/index_en.html  I suggest you play with it first to get to know it's fundamentals.

That manual for the printer is quite good, so concentrate on getting simple instructions received ok, like an LF and Full cut, then progress from there.

I have also had serial instances where inversion of lines 2 & 3 are needed despite manufacturer information describing normality/showing nothing about this.  Once it was squirrelled away in troubleshooting...no mention at all in the main connections advice section.  Dumb!  If all else fails, give it a try.  A breakout box makes this easy and is a great tool to have in the kit.

cheers, and again, good luck.  Serial is sometimes a pain!

Aus

it worked like a charm, the real problem was the printer power supply, the printers are 12v and my power supply was 24v, so i used a lm7812 to supply it, but the power consuption was higher than what the ci could feed, so  i used two instead and worked! thanks for the help guys!

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...