10-13-2006 06:38 AM
@Kjeld Petersen/SDU/DK wrote:
Hi Bill
Now it works. I had a look into the help documentation, and look what I found.
...
When you send a direct command, you should not key in the first 0x00 as it is described in the "Direct commands" manual.
Regards Kjeld
10-13-2006 10:04 AM
10-16-2006 12:23 PM
Hi James,
Thanks for offering to look at the code. I have gone back to square one and dropped the BlueTooth functionality for now. I am trying to follow the main.cpp example, step by step, in LabVIEW 8 using the NXT cabled through the USB.
The attached LabVIEW 8 vi (BTFantomTest-qswitch.vi) performs the following in LabVIEW 8:
1. Call the createNXTIterator.vi with searchBlueTooth set to False (F).
This vi returns an NXTObject cluster and an error cluster. I am ASSUMING this vi also performs the second step found in the main.cpp example of creating an NXT object for the first NXT that was found. The vi runs without error.
2. Call the destroyNXTIterator.vi with the NXTObject and error cluster returned from createNXTIterator.vi
This vi returns the NXTObject cluster and error cluster. The vi runs without error.
3. Call the getFirmwareVirsion.vi with the NXTObject and error cluster returned from destroyNXTIterator.vi.
This vi returns the following error: "VISA: (Hex 0xBFFF000E) The given session or object reference is invalid."
Any ideas?
Many thanks,
-Bill =]
10-16-2006 12:43 PM - edited 10-16-2006 12:43 PM
Hi All,
I hate to answer my own question, but I dropped my assumption that createNXTIterator.vi creates an NXTObject as part of its function.
I added the createNXT.vi to the diagram, before the call to destroyNXTIterator and the LabVIEW 8 code works as described in the main.cpp.
I have attached an updated version of the LabVIEW 8 code.
Thanks! (I'm off to get it working via BlueTooth...)
-Bill =]
Message Edited by qswitch on 10-16-2006 01:44 PM
10-16-2006 01:32 PM
Hi All,
The FantomSDK is working over the BlueTooth interface.
I added the findNXT.vi, pairBluetooth.vi, and isPaired.vi vi's to pair the NXT with the computer.
I then used the createNXT.vi using the VISA Resource string returned by the findNXT.vi INSTEAD of the NXTObject returned from the createNXTIterator used in the previous example.
I have attached example code in BTFantomTest_qswitch3.vi. The sample code connects to the first NXT found by the findNXT.vi.
Best regards,
-Bill =]
10-16-2006 01:52 PM
10-25-2006 05:34 AM
10-26-2006 10:02 AM
10-27-2006 02:47 AM
10-27-2006 10:56 AM