SERIAL COMMUNICATION SOFTPAC controller


#1

Hallo,

I’m using a SoftPAC controller with a SNAP SCM232 card to do serial communication with badge-readers.
I already tried to establish communication using Listen Incoming Communication and Accept Communication, but I never receive anything. Even more, the receive led on the SCM232-card doesn’t light up.
Any suggestions?

Thanks

Marleen


#2

Hi Marleen,

Welcome to the forums.

First up, know that our product support is ready to help, support@opto22.com
If you need help to get up and running, these guys can help fast!
The forums are more for brain storming ideas.

That said, some idea to toss around…

First up, you need that LED flashing when the badge reader scans.
Till that happens, no point in getting into code on SoftPAC.

Start with power. Is there an LED on the badge reader? Does it beep when you scan a badge?
Does it have an LED that twinkles when it sends information?
What baud rate does it send the data?
Do you have a pin out of the serial port of the scanner?
Does it need any hand shaking pins held high or low, or does it just send the code as soon as its scanned?

What sort of rack and controller/brain are you using the SNAP-SCM232 on?
Does it have power?
Do you see the lights on it flash once when you power up (by default the SCM232 module is set to send a message on powerup)?
Can you inspect the brain or controller with PAC Manager?
Have you set the baud rate on the module to match the badge scanner and saved those settings to flash and rebooted the rack?

Once you get the SCM232 module RX light flashing each time you read a badge, then you can start to look at the PAC Control code to read the IP:PORT data from the serial module.

Lets know how you get on.

Ben.


#3

Hi Marleen,

Also check out this thread on 232 communication. The lack of the LED flashing is certainly something you’ll want to solve, as Ben described above.

Once you get that going, check your logic – I know it can be confusing with the comm handles but in this case, even though your bar code scanner is sending the data to your controller, the command you need is “Open Outgoing Communication” (rather than the Listen/Accept you mentioned).

I could tell you more than you want to know about why that is, but suffice to say the PAC controller is initializing the [I]connection[/I] here, rather than whatever brain(?) you have that 232 module connected to.

Happy scanning!

-OptoMary


#4

Hello Ben,

The badge readers work fine. I have put an analyser between the badgereader and the serial module SNAP SCM232 and I see the string that the badgereaders sends to the serial module, but on the serial module I don’t see the RX light flashing.
The module is configured for the right bautrate (1200), databits(8), stopbits(0) and parity (none).
I already tried to connect

  • the RX of the badgereader to the TX of the module
  • the TX of the badgereader to the RX of the module
  • the RTS of the badgereader to the CTS of the module
  • the CTS of the badgereader to the RTS of the module
    but with no success.
    I also tried it with only the RX and the TX connected, but also with no results!

Any more ideas?

Thanks

Marleen


#5

Hallo,

I also found on the forum that the Control Function for Communication Port 0 must be set to NONE.
When I do this and I send the configuration to the I/Os I get the error:
An error occured in Communication Port Control configuration - 0xE005
I don’t find any explanation for this error.
What can cause the error? Is this error the reason why the serial communication doesn’t work?

Thanks

Marleen


#6

Hi Marleen,

Due to your reply / questions, I went and talked to the hardware guys. We ended up pulling up the full circuit for the SCM-232 module and looked at whats driving the LED.
The good news is that the LED is driven off the data coming into the module.
In other words, its not a software LED that can do different functions.

What does this mean for you? It means that the RX LED is hooked directly to the incoming data.
You do NOT need to worry about ANY software configurations to get the RX flashing.
As long as there is power on the rack (and thus to the module), the RX LED will flash when the module sees data.
In fact, you don’t even need a controller or EB on the rack for the LED to flash as the data comes in.

So, bottom line. We need to take a good close look at whats going on with the wiring…

Does the badge reader require any data to be sent to it in order for it to do a read?
Or, does it simply spit out data when a badge is read?
If this is the case, then we should be able to just hook ground, and TX from the reader to the module.
It should be a simple test like that get started.

Do you know the voltage of the reader serial data?
+/- 12 v is the 232 standard, but there are lots of manufacturers that bend (ie, break) that standard.

So, to summarize.
Lets take a step back from the software and any error codes and lets just 100% focus on getting that RX LED to flash as it sees data.
With out this working, everything that follows is just noise.

Ben.


#7

Hallo Ben,

The badgereader send a signal of 9V. Is this voltage to low for the SCM-232 module to see that data is available?

Thanks

Marleen


#8

Hi Marleen,

Is it +/- 9, or 9 and zero volts?
+/-9 should be fine.
9 to 0 I will have to check the hardware.

Most RS232 is a positive to negative voltage swing.

Ben


#9

Hi marleen Got a model of the badge reader? It might help so we can check compatibility.


#10

Hey marleen i think i can also help here! I also had more or less the same problem with sum of our serial devices because of the wiring i made my own cables to connect to the device to the 232! So first you must find out which pins are what on your reader then on the rs232 side you will use pin 2 rx pin 3 tx pin 4 rts pin 5 com pin 8 cts! And now is your interface cable of the reader a 9 pin 15 pin etc! maybe if u could give a make or model so i can work it out for you! And if you use the serial port directly on the controller depends on the model then u get another 3 pins to use com dtr dcd! Hope it helps