IO Error (33)

Hello,

I have a Flexy201 with a 2port serial card (FLA3301) in the leftmost slot. I need to use COM1 to communicate with a RS485 serial device. I have the DIP switches 1-4 on, and 5-6 off.
I have the command below in the Init Section:

Open "COM:1,19200,8n1n" For Binary Input As 1

When I run the script, I get an IO Error (33). As far as I can tell, I am not using either port with any IO Servers.

I have tried “As 2” and “As 3”. I have tried different baud rates, but it ultimately it will need to be as shown above to work with the serial device.

I have tried different settings for COM1 in Communication>General>Serial Ports.

If I use “COM:2,19200,8n1n”, I get no errors. I have an RS232/485 adapter that I used to test using this port, and the communications work. It is only COM1 that doesn’t work.

The Flexy has been updated to 14.3s0.

Any suggestions?

Can you supply a backup with support files of the unit. I would like to get a full picture of the unit.

Hi Kevin, here is the file
MOVED TO STAFF NOTE (43 KB)

Hi Kevin, is there any update on this topic?

Hello,

I would check your IO server settings. That error gets thrown when COM Port is already in use by another IO server.

COM port 2 is allowed, as it’s not being used by any other IO server.

i have changed COM setup of IO Server into COM2 and continue to use port1 as well as the opposite case but nothing changed

Hello, The back up you supplied was the incorrect back.

I do not see any com port configuration on this unit that uses serial. Nor do i see the command that you highlighted above.

Can you replicate the issue and create a new backup with support files?

Hi Kevin, this is the new backup file
Also it turns out that the code works fine with RS232, but always got problem with rs485 in my case
My purpose is trying reading the custom rs232 ascii with flexy 205
MOVED TO STAFF NOTE (75.5 KB)

.

Hello,

Can you clarify a few things real quick?

Com Port 1 Dip Switch Configuration: Is it set to RS232 ( All Open) or RS485 ( 1-4 Closed, 5-6 Open)?
If you switch the communication to RS485 are you updating the dipswitches and powercycling before use?

The second port is used for RS232 only. SO if you are trying to communicate with RS232, it will function. If you have the dipswitch configured for RS485, it will not communicate with a RS232 line.

Yes, i have updated the dipswitches when i back to use RS485(tried with and without terminations) and rebooted the Flexy before i run the script
The reason i used RS232 on port 1 is just for checking

Hello,

I discovered the problem within your command. For handshaking you have it set to “n” which means no handshaking.

If you set to “h” for half Duplex, that error becomes resolved.

Oh i see
Thank you very much for your supporting, Kevin

Hello,

Thank you for your patience on this matter.