There's no single way to play a trill, and how it's performed depends on the meter, the tempo, and the style of music (baroque trills start differently than classical trills).
You can attempt to program a trill by inputing a string of 16ths, 16th triplets, 32nds, or 32nd triplets and change every other note in the matrix/score/event editor and create a trill-like effect, but guaranteed it's going to sound horribly mechanical regardless of how much tweaking you do to it. Trills are rarely performed metrically perfect. There's a fair amount of leeway with the timing. Sometimes a trill starts as approx 32nd notes but ends up being a nontuplet (group of nine notes) towards the end.
If you attempt this, you don't want to use a monophonic sound. You want there to be at least two voices which overlap ever so slightly. Release time of the sampler plug (or synth or whatever) will have a significant effect, where you need to split the difference between too "tight" and too "washy".
Don't know what to advise other than attempting what I described above. Better off either playing in the trill yourself to at least get some feel into the part, or, finding some appropriate trill samples.