The problem with using a trigger to immediately alter the speed of a train (or its maximum allowed speed) is doing it without destroying the current list of driver commands that the train may be executing. Triggers are used to activate session rules which can then be used to replace an existing list of driver commands with a new list (thus destroying the current command list) or add new commands to the end of the current command list (thus the speed change will not come into effect until after the current commands have finished).
Better to add the Set Max Speed To driver command (there are two versions, one in mph and the other in km/h) to the drivers command list or as pointed out above use track speed signs, visible or invisible.