Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 05:54:51 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Cant get VB script to work
Pages: 1   Go Down
Print
Author Topic: Cant get VB script to work  (Read 448 times)
0 Members and 1 Guest are viewing this topic.
inioxos
Active Member

Offline Offline

Posts: 7


View Profile
« on: September 02, 2010, 01:23:22 AM »

Hello there,

I just want to energize a output and change pulley.

I am new to this and i have tried several scripts but nothing.
The following is giving a '' Scriper Compile Error. In SpindleSpeed.mis''


rpm = GetRPM()
If
RPM > 2501
Then
SetPulley(2)
ActivateSignal(OUTPUT5)
End If

If
RPM < 2501
Then
SetPulley(1)
DeActivateSignal(OUTPUT5)

End If
SetSpinSpeed( rpm ) 


What is going on?Huh

* spindlespeed.m1s (0.18 KB - downloaded 31 times.)
Logged
stirling
Global Moderator
*
Online Online

Posts: 1,109

UK


View Profile WWW
« Reply #1 on: September 02, 2010, 04:41:58 AM »

Don't split your "if expression then" constructs accross lines.

If
RPM > 2501
Then

If RPM > 2501 Then

Cheers
Ian
Logged
inioxos
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #2 on: September 02, 2010, 07:47:18 PM »

Thank Ian 

Simple issues are most difficult.


Logged
stirling
Global Moderator
*
Online Online

Posts: 1,109

UK


View Profile WWW
« Reply #3 on: September 03, 2010, 02:55:41 AM »

 Smiley
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!