Taking pictures and posting it here would help us troubleshoot your system easier, however we'll try to do it without.
If your absolutely sure you have connected optical connection then all you need to do is change the setting on your TV to output digital signal. Note that the optical signal should come OUT of the TV and not IN, so check your cabling thoroughly.
Make sure you check your sound-bar setting to receive digital signal through toslink or optical connection.