PLC Omron talk To AVR Microcontroller

make new Project on CX-ONE PLC TYPE CQM1H CPU21 Network type Sysmac Way
Set Hostlink Baud 9600 Format 1,8,1,N Mode Hoslink
StartUp chose Monitor
Make Program below:
Bascom Listing:

$regfile = "m32def.dat"
$crystal = 11059200
$baud = 9600
Config Portc.1 = Input
Config Portc.0 = Input
Portc.0 = 1
Portc.1 = 1
Do
 If Pinc.0 = 0
Then Print "@00WR0020000146*" + Chr(13)
End If
If Pinc.1 = 0
Then Print "@00WR0020000047*" + Chr(13)
End If
Loop

 See the video below

AVR microcontroller talk to PLC Omron

make new Project on CX-ONE PLC TYPE CQM1H CPU21 Network type Sysmac Way
Set Hostlink Baud 9600 Format 1,8,1,N Mode Hoslink
StartUp chose Monitor
Make Program below:
Bascom Listing:

$regfile = "m32def.dat"
$crystal = 11059200
$baud = 9600
Config Portc.1 = Input
Config Portc.0 = Input
Portc.0 = 1
Portc.1 = 1
Do
 If Pinc.0 = 0
Then Print "@00WR0020000146*" + Chr(13)
End If
If Pinc.1 = 0
Then Print "@00WR0020000047*" + Chr(13)
End If
Loop

 See the video below