Omron Encoder/Counter splitting signals

Hello,
I have the following Omron Encoders and Omron counters.
I would like to pass the encoder signal to both the counter, and the arduino. Currently, the encoder interrupt library works with the arduino, but not with the counter. If I disconnect the power and signal pins from the arduino, the counter starts working again. I would like to make both counter and arduino work, but I am having trouble with this. I suspect its something to do with the electrical circuitry, not with the program. But I also suspect its something to do with the internal pullup on the arduino feeding 12V to the encoder signal line and not allowing the counter to see any steps.
Following are the links for the omron products:
encoder:
I can only put two links on the forums as I'm a new user so please look up this part number for information.
E6A2-CW5C 500P/R
Counter:

Rough Schematics:
Forums won't let me upload documents so here is the google drive with my schematic.
https://drive.google.com/drive/folders/1WBsx_xm5IWxfmVTIHD82OGiWlJGOVMjz?usp=sharing

The following is the program I am using. The library is RotaryEncoder.

// -----
// SimplePollRotator.ino - Example for the RotaryEncoder library.
// This class is implemented for use with the Arduino environment.
//
// Copyright (c) by Matthias Hertel, http://www.mathertel.de
// This work is licensed under a BSD 3-Clause License. See http://www.mathertel.de/License.aspx
// More information on: http://www.mathertel.de/Arduino
// -----
// 18.01.2014 created by Matthias Hertel
// 04.02.2021 conditions and settings added for ESP8266
// -----

// This example checks the state of the rotary encoder using interrupts and in the loop() function.
// The current position and direction is printed on output when changed.

// Hardware setup:
// Attach a rotary encoder with output pins to
// * 2 and 3 on Arduino UNO. (supported by attachInterrupt)
// * A2 and A3 can be used when directly using the ISR interrupts, see comments below.
// * D5 and D6 on ESP8266 board (e.g. NodeMCU).
// Swap the pins when direction is detected wrong.
// The common contact should be attached to ground.
//
// Hints for using attachinterrupt see https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/

#include <Arduino.h>
#include <RotaryEncoder.h>

#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO_EVERY)
// Example for Arduino UNO with input signals on pin 2 and 3
#define PIN_IN1 2
#define PIN_IN2 3

#elif defined(ESP8266)
// Example for ESP8266 NodeMCU with input signals on pin D5 and D6
#define PIN_IN1 D5
#define PIN_IN2 D6

#endif

// Setup a RotaryEncoder with 4 steps per latch for the 2 signal input pins:
// RotaryEncoder encoder(PIN_IN1, PIN_IN2, RotaryEncoder::LatchMode::FOUR3);

// Setup a RotaryEncoder with 2 steps per latch for the 2 signal input pins:
RotaryEncoder encoder(PIN_IN1, PIN_IN2, RotaryEncoder::LatchMode::TWO03);


#if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO_EVERY)
// This interrupt routine will be called on any change of one of the input signals
void checkPosition()
{
  encoder.tick(); // just call tick() to check the state.
}

#elif defined(ESP8266)
/**
 * @brief The interrupt service routine will be called on any change of one of the input signals.
 */
ICACHE_RAM_ATTR void checkPosition()
{
  encoder.tick(); // just call tick() to check the state.
}

#endif


void setup()
{
  Serial.begin(9600);
  while (! Serial);
  Serial.println("InterruptRotator example for the RotaryEncoder library.");

  attachInterrupt(digitalPinToInterrupt(PIN_IN1), checkPosition, CHANGE);
  attachInterrupt(digitalPinToInterrupt(PIN_IN2), checkPosition, CHANGE);
} // setup()


// Read the current position of the encoder and print out when changed.
void loop()
{
  static int pos = 0;
  encoder.tick();

  int newPos = encoder.getPosition();
  if (pos != newPos) {
    Serial.print("pos:");
    Serial.print(newPos);
    Serial.print(" dir:");
    Serial.println((int)(encoder.getDirection()));
    pos = newPos;
  } // if
} // loop ()


// To use other pins with Arduino UNO you can also use the ISR directly.
// Here is some code for A2 and A3 using ATMega168 ff. specific registers.

// Setup flags to activate the ISR PCINT1.
// You may have to modify the next 2 lines if using other pins than A2 and A3
//   PCICR |= (1 << PCIE1);    // This enables Pin Change Interrupt 1 that covers the Analog input pins or Port C.
//   PCMSK1 |= (1 << PCINT10) | (1 << PCINT11);  // This enables the interrupt for pin 2 and 3 of Port C.

// The Interrupt Service Routine for Pin Change Interrupt 1
// This routine will only be called on any signal change on A2 and A3.
// ISR(PCINT1_vect) {
//   encoder.tick(); // just call tick() to check the state.
// }

// The End

Seems like the encoder wasn't meant to send signals to two devices, so I may need to use a optocoupler to make this work. Any feedback is appreciate, thanks.

If the encoder is feed with 12 volt it should not be connected straight to any Arduino.
Post a wiring diagram, NOT FRITZING, showing Your circuit into the Arduino, please.

Sorry, was in a rush so this was the best I could make without learning a whole new software.
The 12V+ is a power supply off of the Omron counter, and arduino Vin pin can take up to 12V. Signals from the encoder requires 12V and a common ground so I wired it that way.
After speaking with technical support, it seems like the encoder wasn't meant to supply signals for two devices, so I need a separate power line, which is why I decided to implement a optocoupler.

Don't make any signal connection from that encoder to the Arduino without conditioning the encoder signal to Arduinos levels. Voltage dividers, 2 resistors per signal would do.

Hi,
Thank you for your response, I appreciate the feedback.
From what I see the input pin voltage limit is Vcc(power supply) + 0.3V.
So using signals of 12V, as long as arduino is supplied with 12V would make sense to me. Would your concern be damaging the arduino?

Do you understand the circuitry involved with the omron counters and encoders?

No, no, no... You've got it terrible wrong. You are feeding 12 volt to Vin. That input feeds an internal converter that makes Vcc, 5 volt for the board.
This way You will likely fry the Arduino.

Your link doesn't tell how You connected the sensor to the controller but my previous reply is enough I think.