Calling IMAQ Serial Read.vi or imgSessionSerialRead Returns 8192 KB of 0x00 Data Primary Software: Driver Software>>NI-IMAQPrimary Software Version: 3.5.1 Primary Software Fixed Version: N/A Secondary Software: N/A Hardware: Image Acquisition (IMAQ)>>Digital Image Devices>>PCI-1428, Image Acquisition (IMAQ)>>Digital Image Devices>>PCI-1427, Image Acquisition (IMAQ)>>Digital Image Devices>>PCIe-1429
Problem: I am trying to test my serial communication with my camera but if I use the IMAQ Serial Read.vi or imgSessionSerialRead all that gets returned is 8192 KB of 0x00. I have tested the cable and the command is sent successfully but I cannot read the response from my camera. I tried to test the serial communication in the NI Camera File Generator and it does the same thing. What is wrong with my system? Solution: IMAQ Serial Read.vi and imgSessionSerialRead read serial data until a termination character is reached. If no termination character is being used they will return an empty buffer. The default size of the IMAQ serial buffer is 8192 KB which is why you see this data. The NI Camera File Generator uses the Serial Read function underneath, so if you are not using termination characters you will see this same behavior in the NI Camera File Generator. To successfully communicate with your camera if no termination character is being used you will need to use the IMAQ Serial Read Bytes.vi or imgSessionSerialReadBytes function in a test program. See KnowledgeBase 3UKIJMD3: Using the IMAQ Serial Read Function Without a Termination Character for more information on the IMAQ Serial Read Bytes.vi. Related Links: KnowledgeBase 3UKIJMD3: Using the IMAQ Serial Read Function Without a Termination Character Attachments:
Report Date: 01/24/2007 Last Updated: 02/07/2007 Document ID: 45NI6OGH |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
