In the last line you're referring to the 'Value_out' and trying to access its 'DigState' property. If the 'Value_out' tag isn't defined as a Digital State tag, I don't think you can do this.
Instead I think I'd try to create a new, empty tag (myDigStateTag) in the ACE calc. and set the data type to Digital State. Then you can set the appropriate Digital State from the System digstate set - and then convert it back to an integer by using myDigStateTag.Code.
Set Value_out.Value(Trigger_time) = myDigStateTag.Code
Try it out, and see what you can make of it!
The solution is even simpler than that... just do
No need to create any PI SDK objects... PI ACE (both 1.x and 2.x) will handle that automatically for you.
Value_out.Value = "No Sample"
I didn't open Visual Studio to try it first. But I belive I'm right about the fact that you can't access Value_out's DigState property if it isn't explicitly defined as a DigState tag?