Judge Michael Heath also imposed an indefinite restraining order, which means she can only visit her husband, 79, under supervision at a care home where he now lives.
The judge told the court: "This is a highly unusual and extremely sad case.
"They had been happily married for 40 years and were devoted to each other. There are very exceptional cases where justice should be tempered with mercy. This is one of them."
Earlier, Gordon Aspden, prosecuting, told the court that Mrs Thomson was her husband's sole carer and that his dementia had "became a source of extreme frustration to her".
He added: "Florence Thomson had for some time been finding things very difficult in coping with her husband's dementia and caring for him.
"The cumulative effect appears to have caused this elderly lady to snap and to harm both herself and her husband."
Her daughter Sheena Pentney, 60, raised the alarm after she went to her mother's new home, which they moved into a few days before, at 8am on 11 November last year to meet tradesmen.
She reported witnessing her mother walk out of the kitchen holding a carving knife, looking "totally deranged", with a wild look in her eyes and covered in blood.
When armed police attended the house, she repeatedly ignored requests to drop her knife and was tasered twice.
Her husband, a retired electronics worker, was taken to hospital suffering 10 stab wounds to his chest as well as injuries to his shoulder, hands and right thigh.
Mrs Thomson, who was treated for cuts, told police at the hospital "I love my husband. I love him to bits. I lost it. I just flipped my lid.
"You always hurt the one you love and I hurt my husband. It was because of the stress. The pressure of moving house got to me. Please, please, I'm sorry for what I've done."
Mrs Thomson had already spent five months in custody on remand.
Outside court Andrew Chidgey, spokesman for the Alzheimer's Society, said: "There are 600,000 people in the UK acting as the main carers for people with dementia.
"Supporting a loved one is something that most carers gladly do as they want to keep that person living at home for as long as possible. However caring for someone with dementia is a 24 hour job. It can be extremely stressful, and can take a large toll on the carer's physical and mental health.
"Carers do a great job of caring for their loved ones but we must ensure they receive support early on, help with day-to-day caring and get the chance to have a break."
He added: "They must think about their own well being as well as that of the person they care for. This could include getting a care assessment and considering other options of care."