WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 01-21-2010, 09:39 AM
ursi ursi is offline
Member
 
Join Date: Dec 2009
Posts: 11
Hi,

I can now feed in 'my' voltage from the external source and print just the voltage output. So, that works fine, thanks.

But it prints the result still every second, so the if-condition does not seem to work properly...


Code:
def ExtTrigg():
	print 'trigger > 2.0'


###+++++++++++++++++++++++++++
def checkTrigger():		
	trigg = d.eAnalogIn(0) # AI0
	if trigg > 2.0:
		ExtTrigg()
		print trigg['voltage']

vizact.ontimer(1, checkTrigger)
Another question: can I chance the code, so that the frequence for checking the trigger would be higher than once a second?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implement LabJack ursi Vizard 4 01-07-2010 03:14 PM
Updating viewpoint via external computer Rachel Vizard 1 02-04-2008 06:23 PM
labjack plugin Jerry Vizard 1 03-14-2007 04:36 PM
collision events trigger Eunice Vizard 1 01-03-2006 10:39 AM
A hotspot id of -1 will never trigger. jrodman Vizard 1 01-27-2004 03:22 PM


All times are GMT -7. The time now is 01:31 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC