WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 01-20-2010, 12:06 PM
ursi ursi is offline
Member
 
Join Date: Dec 2009
Posts: 11
The problem still remains...

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


###+++++++++++++++++++++++++++
def checkTrigger():		
	trigg = d.eAnalogIn(0) # AI0
	if trigg > 2.0:
		ExtTrigg()

vizact.onupdate(0, checkTrigger)
How can I address the 'right' output to be checked?
Why does it not work to feed in a voltage?
Reply With Quote
  #2  
Old 01-20-2010, 04:40 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
What do you get if you try the following? This should print out the voltage once a second. Do you notice any errors in Vizard's input/output window?
Code:
def checkTrigger():		
	trigg = d.eAnalogIn(0) # AI0
	print trigg['voltage']

vizact.ontimer(1, checkTrigger)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 08:55 AM.


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