# Two Simple Scripting Questions

**URL:** <https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555>\
**Category:** Ignition\
**Created:** [September 30, 2015, 6:22pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555 "2015-09-30T18:22:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alewayhar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alewayhar](https://forum.inductiveautomation.com/u/alewayhar)\
**Post date:** [September 30, 2015, 6:22pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555/1 "2015-09-30T18:22:17Z")

</div>

Question 1: Has anyone encountered any issues with not being able to call up the system libraries by hitting Ctrl + Space after typing in system. ? Every now and then it happens to me, and it’s kinda frustrating when i’m in the groove ![8)](https://us1.discourse-cdn.com/inductiveautomation/original/1X/587d7fe0d6822f36e81815ab06aa7164e9d2e057.gif "Cool")

Question 2: What is the easiest way to link a property to the current second? I’m wanting to make my fan blades rotates and I figured if I just link the angle to the current second, it would rotate pretty consistently even if there’s some sort of ‘jump’ from 0 to 60. I have no clue how to call up the current second to make it the property. Help?

Thanks in Advance! ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [September 30, 2015, 6:45pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555/2 "2015-09-30T18:45:23Z")

</div>

You could put the following expression in an expression tag:`dateFormat(now(), "s")`

---

<div class="post-metadata">

**Author:** ![alewayhar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alewayhar](https://forum.inductiveautomation.com/u/alewayhar)\
**Post date:** [September 30, 2015, 6:52pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555/3 "2015-09-30T18:52:36Z")

</div>

That works and my fan blades are definitely spinning now, can I do the same thing with milliseconds? Or do you have a good suggestion for making fans spin?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [September 30, 2015, 6:57pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555/4 "2015-09-30T18:57:07Z")

</div>

You can use a timer component.

---

<div class="post-metadata">

**Author:** ![AlThePal](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/althepal/32/3603_2.png) [@AlThePal](https://forum.inductiveautomation.com/u/AlThePal)\
**Post date:** [September 30, 2015, 7:00pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555/5 "2015-09-30T19:00:21Z")

</div>

Generally I wouldn’t 🙂 It doesn’t add much information and it’s generally too distracting. I wouldn’t try to do anything graphical faster than a second or so as things like Java garbage collection can make it update unevenly and your eye is very good at picking up stutters - animation needs to update every 40ms to look smooth.

---

<div class="post-metadata">

**Author:** ![alewayhar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@alewayhar](https://forum.inductiveautomation.com/u/alewayhar)\
**Post date:** [September 30, 2015, 7:07pm UTC](https://forum.inductiveautomation.com/t/two-simple-scripting-questions/10555/6 "2015-09-30T19:07:38Z")

</div>

OK, I’m totally ok with that. It just seemed a little slow at first, but as long as their moving, I’m ok with that. I did, however, multiply the seconds by 4 or 5 to make them move a little more each second and that looks a little better to me. Seconds are definitely good, no need to use ms 🙂
