To claim your daughter as a dependent when she does not live with you, she
1. must have less than $4050 of taxable income,
2. you pay more than half her total living expenses for the whole year (considering support from all sources including husband, state aid, etc.)
To claim your grandchildren as dependents when they do not live with you, they
1. must have less than $4050 of taxable income
2. you provide more than half their total support
3. no other taxpayer can qualify to claim them ahead of you.
Their mother qualifies ahead of you if she lives with the children more than half the nights of the year. She is a taxpayer if her income is more than $10,300 and she is required to file a return, or her income is less but she files a return to claim EIC or other credits. If her income is less than $10,300 and she only files a return to claim a refund of tax withheld and does not claim any other credits or benefits, then she is not a taxpayer.
Also, the father might qualify ahead of you if the children lived with him more than half the year and he is a taxpayer. For example, if they separated in July, then the father probably lived with his kids more than half the year. But if they separated earlier and he doesn't have much custody, then he might not have had them for 183 nights.