Is it possible to use a Optical Shaft Encoder in VCS for V5 and how?

Yikes, just went to check out the documentation for VCS to try to help you out.
It is terrible. I had to zoom out to be able to view the list in Firefox, and the documentation is so unhelpful.

It appears as though encoder(triport::port &port) only takes one port as a paramiter.
Whether triport::port is actually a group of ports or not, I can’t tell. the documentation does not define it.

I’m not sure what to say. You definitely need 2 ports to make an encoder work.
Save yourself this pain and ditch VCS. Switch to RMS or VEXCode.

Edit:
Actually, looking at the RMS documentation (which does define triport), it’s the same thing.

How I think it works is that you are supposed to provide the left port, and it will automatically set up the next port to the right.
This is why you are only supposed to use “odd” ports (A, C, E, F) as the first port.
When you tell it to use port A, it will set up port A and B.

@Kselva20 you might have had your problem because you had the left port starting on an “even” port, or the 2nd port was not right next to the first.