Yamaha have produced five different CDI’s for the TW over the years. This is a blow by blow account taken from the Partzilla website.
Yamaha Motorcycle Parts
When referring to this list, bear in mind that your TW may have been made in one year, but first registered in the next So if the CDI for your bike changes in that preceding year, or even the next year, it would be best to provide the serial number (on the headstock) to the supplier to avoid getting the wrong one.
1987 - 2JX-85540-M0-00 CDI UNIT ASY - $260 – (one off year)
1988 to 1997 - 2YG-85540-M0-00 CDI UNIT ASY – $260
1998 to 2000 - 2YG-85540-10-00 CDI UNIT ASY – $216
2001 to 2009 - 5LB-85540-00-00 CDI UNIT ASY – $136
2010 to 2014 - 5LB-85540-01-00 CDI UNIT ASY – $136
At the time of writing, prices were correct from Partzilla (but shop around) - there was no listing yet for 2015 onwards.