キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

communicate with using RS485

Hi All,

 

I am trying to communicate with a device that use RS485 using Labview 2018.

i manage to control the device by using visa write. but I am not manage to get any respond by visa read. As I need to get the data from the device for data report.

is there any mistake on my source code?

 

thanks in advance!write and read load cell.png   

0 件の賞賛
メッセージ1/7
2,308件の閲覧回数

As any other experienced LabVIEW user says, do not use bytes at the port, instead, if your device has some sort of termination character, let VISA take care of waiting for that termination character to appear.

 

Please share your RS485 device programming manual.

 

BTW, you've already sequenced the order of operations using error wires, no need for a flat sequence structure.

 

This is a good article to learn VISA usage - https://labviewwiki.org/wiki/VIWeek_2020/Proper_way_to_communicate_over_serial

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
メッセージ2/7
2,295件の閲覧回数

Also your Flat Sequence Structure is superfluous. 

 

In fact if you ever find yourself reach for a Sequence Structure, stop and think about it.

 

Chances are you do not need it at all and if you still think you do, come here and ask questions.

 

If this day and age the Sequence Structure (Flat or worse yet Stacked) should be deprecated and still available only for backwards compatibility with old code. 

========================
=== Engineer Ambiguously ===
========================
0 件の賞賛
メッセージ3/7
2,289件の閲覧回数

Thanks for your feedback,

 

can help to explain more on the termination character?

here i attached the manual of the device

0 件の賞賛
メッセージ4/7
2,283件の閲覧回数

Oh my what a horrendous communication protocol. It seems somewhat Modbus like yet more convoluted...

 

What do these companies have against industry standards? Why must they reinvent the wheel?

========================
=== Engineer Ambiguously ===
========================
0 件の賞賛
メッセージ5/7
2,265件の閲覧回数

Looks like somebody made a VI for another instrument from same manufacturer

 

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Instrument-interface/td-p/2249024

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
0 件の賞賛
メッセージ6/7
2,253件の閲覧回数

@RTSLVU wrote:

Oh my what a horrendous communication protocol. It seems somewhat Modbus like yet more convoluted...

 

What do these companies have against industry standards? Why must they reinvent the wheel?


I wouldn't call it horrendous. Complicated yes and very much on the barebone level of the microprocessor programming inside the device. Someone was using either a very constrained low power CPU with little memory available or porting a design from such a device to this hardware.

A SCPI interpreter is fairly complex to write and can take up more memory than what some 8 bit CPUs can allow, if you have a poor compiler to work with. This protocol can be implemented in a few kB of code even with a horrendously inefficient compiler.

 

Interfacing it from a C program is almost trivial if you just make the structures match to your specific C compiler. In LabVIEW it is only a little bit more complicated when you use the Flatten To String and Unflatten from String functions. In Python you need the ctypes library.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 件の賞賛
メッセージ7/7
2,207件の閲覧回数