LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stir plate to connect to Labview

Solved!
Go to solution
Solution
Accepted by topic author Alici

NI MAX will not 'recognise' the stir plate. It's not an NI device and it uses a proprietary protocol so how would MAX know how to discover/handshake with the device? All NI MAX will show is the Serial port.

 

If you are sending the literal string "0xfe 0xA0 0x00 0x00 0x00 0xA0", that is incorrect. The documentation is telling you to send 6 bytes of data, and it is being displayed in hexadecimal. If you sent that literal string, you are sending about 29 bytes of data which is the ASCII representations of the characters in that string above. The 'hint' was when I asked if you were writing a string with the display set to show hexadecimal characters.

 

Here is an example:

HexStringConversion.png

 

 

 

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 11 of 19
(1,913 Views)

Thanks for the explanation of setting Labview to hexadecimal display.  It sounds like I was entering the string incorrectly. My first attempt at entering the string in hexadecimal still gave the same error, but I need to go back and play with different variations of the settings to see if changing something else will help now that the string is being appropriately entered.

0 Kudos
Message 12 of 19
(1,899 Views)

I've been trying different options for the settings and even with hexadecimal code am still getting the timeout error.  We're using a slightly modified example template that includes an option for flow control, a termination character, and to end read and/or write with a termination character.  All of these settings have lots of options, sometimes over 20.  Are there any particular options that most commonly work? I have tried with both 7 and 8 data bits since different sources give conflicting information for that setting. I've included a jpeg of the front panel and block diagram.

 

Thanks.

 

 

Download All
0 Kudos
Message 13 of 19
(1,875 Views)

Hi Alici,

It looks like someone else on the forums found a way to connect a Scilogex hotplate through NI VISA, i've included the link below to their forum discussion.

Forum post: http://forums.ni.com/t5/LabVIEW/buffer-problem/td-p/1472270

 

Based on this, you should be trying to set up your device to work through VISA first, which will make it much easier to operate with in LabVIEW.  I would like at section 3 of this VISA White paper for guidance on how to do this.

 

NI-VISA Driver Wizard White Paper:http://www.ni.com/tutorial/4713/en/

0 Kudos
Message 14 of 19
(1,843 Views)

Thanks for the suggestions.

 

Earlier in this thread I was told that NI MAX wouldn't be able to recognize my device since it isn't a NI device, that it would only be able to recognize the NI RS232 to USB device.  Is there a place to test my device in VISA without trying to also test it in Labview that doesn't use NI MAX?

 

I have seen the thread you mentioned, but if there was ever a solution found to the timeout error in that example, I'm not finding it posted.

 

How do I find the product and vendor ID to create a NI-VISA driver?   I tried looking in Windows Device manager (Properties>details), but that just shows information for the RS232 to USB device rather than the stir plate. I've currently e-mailed the company to see if they might have the information.

0 Kudos
Message 15 of 19
(1,803 Views)
The stir plate does not use the SCPI standard for communications (it has it's own protocol) so it probably doesn't have a product/vendor ID.

You can test NI VISA using the VISA Test Panels. It will allow you to send/receive serial commands.

Again - the stir plate communicates via Serial/COM ports - it will not show up in device manager as the device is not physically 'part' of the system - only the COM port will show up (e.g. COM1 - the NI USB to Serial adapter).

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 16 of 19
(1,791 Views)

I just got the stir plate to respond in the VISA test panel.  Typing in the code correctly in hexadecimal was the key.  I needed to put slashes and use all capitol letters for my input.  (\FE\A0\00\00\00\A0).  I still need to get the VI to work.  The current result is that it returned a string of y's with an accent mark over them, but at least it is responding.

 

Thanks for the help.

 

Alicia

 

 

0 Kudos
Message 17 of 19
(1,755 Views)

Oops. The line of y's was an issue of forgetting to set the response to hexadecimal.

0 Kudos
Message 18 of 19
(1,750 Views)

I have another question on this program but can start a new thread if I need to since I already marked this one solved.  I am trying to modify the vi so I can input a stir speed number, modify it to hexadecimal, concatenate it to the rest of the input string(including a checksum) and send it to the instrument in hexadecimal format.  For example, the user would input 70  to send FEB1 0046 00F7 in hexadecimal to the instrument where the 0046 and F7 are calculated in the program. I tried using the number to hexadecimal string function, but it returns a string that looks like what I would like to send in normal display but gives something completely different in hex display. Is there a way to start with a number (not in hexadecimal) and convert it to showing up as the hexadecimal equivalent in hexadecimal display?

Thanks.

0 Kudos
Message 19 of 19
(1,715 Views)