Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Scripting for Time string to Seconds
PostPosted: Thu Jul 12, 2018 1:30 pm 

Joined: Thu Jul 12, 2018 1:23 pm
Posts: 1

Offline
I have tried to run this through several times and can get it working fine in simulated mode but never the HMI. I am currently using the X2 7 Pro.

Code:
string time = Globals.Tags.Test1.Value;
Globals.Tags.Test.Value = Convert.ToInt32(TimeSpan.Parse(time).TotalSeconds);

And as i said before it works in the PC build and simulation but i get format exception with everything i have tried inside the HMI.
Anyone know a fix for this problem ?


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron