Donna - from Frankfort, KY
You indicate that when you were done making the royal icing, it was foamy. It seems like you didn’t beat it long enough. The icing should look like very stiff egg whites when you are done. Mixers vary in power, so possibly your mixer wasn’t powerful enough – try beating the icing longer.
Also, you need to make sure all the utensils (bowl, mixer beaters, spatula, etc.) are grease-free. Any oil or grease, even the smallest amount, will break down royal icing, meaning that it doesn’t thicken up or become stiff enough to pipe.
Finally, corn syrup should never be added to royal icing. It is only used in buttercream icing to thin it.