LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataTaker communication

Hello everyone,

 

I am trying to communicate with a DataTaker 831 device over TCP to log some pressure channels. To initially check and verify the communication I have been trying to connect with NI's Measurement and Automation Explorer (MAX) but I can't seem to get the correct communication. The DataTaker has a program that when running will send information every 10 seconds over Ethernet. To start the program I need to send "G" to the DataTaker. Once the DataTaker receives the "G" command a LED will indicate that it is running. If I use the web interface of the DataTaker I can start the program just fine, but I can't seem to get it to start when using MAX. I have tried both "G" and "G\n" but both cases the DataTaker does not start it's program.

I have also tried to just query the channel data using the LabView drivers from DataTaker but it always times out waiting for a response.

 

DataTaker Communication 1.PNG

0 Kudos
Message 1 of 4
(2,935 Views)

From your image, it looks like you did a Write (G\n) then a Clear.  While I'm not sure how your device works, when I use MAX to communicate with a VISA device, I send the Write command, then I do a Read.  The idea is that the Write tells the device "Send me some data", and you need to read that data before the device times out.

 

One catch (for VISA devices) is you need specify the number of bytes to read, which you might not know in advance.  VISA has the concept of a "Termination Character" (often \n) that stops the Read when received, so a common practice is to tell the Device to use a Termination Character, then deliberately read more characters than you expect (e.g. 1024).  Look on the Configuration Tab in MAX and see if you have settings for Termination Characters.

 

Bob Schor

0 Kudos
Message 2 of 4
(2,881 Views)

Have you tried using the dataTaker DT8x Driver for LabVIEW?

 

Scroll down to the bottom of that page and you will see links to the driver and release notes.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(2,870 Views)

I hit the clear to just try and clear any data that may be there. My normal test is to try and send the G command then read data with a timeout of 15 seconds. I am pretty sure the G command is not being received because normally a LED on the device will light up letting me know that it is running data acquisition. 

 

 

RTSLVU, I initially tried the drivers from that page but they timed out. I tried to dig down and see what they were doing, but the lower level VI's are locked. I also didn't see a VI that works quite how I want it to. There were VI's for directly querying data which I suppose could work, but I could not get them to work, they just timed out. What I really want to do is just start the program then read the TCP port waiting for data.

 

I contacted DataTaker and they are asking what the actual ASCII command sent was. As far as I know MAX just sends that command in ASCII, I am also assuming that all the TCP level stuff is handled underneath everything but I am not very familiar with TCP.

 

 

 

0 Kudos
Message 4 of 4
(2,863 Views)