Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Activex serialRS232

Better. For some reason, I cannot read any of the help topics. I see them listed but nothing opens. On the other hand, section B.1 in the manual describes how you could communicate to the sensor without the dll. There is a description of how to use commands with the VISA/TCP interface in LabVIEW or a terminal emulation program such as Hyperterminal. Personally, I would use VISA to send/receive the commands.

 

So, did you also get some other software from the vendor? Some exe that allows you to read/write? If you have that and it works, it verifies you have the cable and com settings correct.

0 Kudos
Message 11 of 17
(1,709 Views)

I have a software but only for configuring the sensor.

My cable and settings are correct :

I use an USB-232 adaptator which is on my port COM3 and correctly detect

BAUd 115200, PARITY none, 8bits ect....

 

So for me my config it's correct. If I start the software i directly can communicate with the sensor.

 

Attached is my VI without any connection. now I want to add the "block" RS232 connection,because, maybe I missunderstand something but, If I want to receive data by RS232 I must use serial VISA "block", it's not automatic (with automation open)? I have tried to add VISA without any success.

You, how do you do that?

0 Kudos
Message 12 of 17
(1,705 Views)

You have the option of using the ActiveX library or using VISA. I can't tell if your ActiveX Vi is correct because I cannot read the help file for it.

 

For using VISA, you could start with one of the simple examples such as Basic Serial Write and Read but I would advise you to start with a program such as Hyperterminal. You can also use MAX to test serial communication. A command in the LabVIEW example or in MAX could be ACQ ? ,ALL followed by \r\n for the carriage return\line feed.

0 Kudos
Message 13 of 17
(1,701 Views)

I will try to do it tomorrow.

 

If i not sucess I will try to do a pdf file of the help file.

 

Thank you so much for your help.

 

If I success I will write you too ;).

 

 

0 Kudos
Message 14 of 17
(1,696 Views)

I'm back with some news informations.

 

To remind you : I have a Polytec Sensor and I want to read data from the sensor.

 

I have the .DLL with activex objects.

 

In fact, the .dll contain COM (component object model). I can't use hyperterminal with my sensor because the data send by the sensor are not compatible with hyperterminal (this is an answer from Polytec).

 

I have .dll with COM objects. With the block "automation open" I can choose methods or object and build my .vi.

 

To read COM .dll with "automation open" I have done this :

1. Register DLL into Windows 
- Go to <local folder>\WINDOWS\system folder 
- Copy paste your dll file into this folder, TraceDataV28_test18.dll 
- Open Command Prompt (cmd), go to directory <local folder>\WINDOWS\system and type REGSVR32 "TraceDataV28_test18.dll"

cmd.PNG

- A pop up window should appear notifying you that the dll has been registered 

2. Use Invoke/Property Node: 
- Open LabVIEW 
- Drag and Drop Invoke Node at Functions Palette>>Application Control>>Invoke Node 
- Right Click on it, and Select Class>>ActiveX>>Browse...

blockdiagram.PNG

 

Browse for your DLL file, and you can select which COM method you want to use.

blockdiagram2.PNG

 

Now I want to understand something. I receive my data by ethernet and I know the IP address of my sensor. When I start my .vi, it works but I have

no data (or wrong data).

 

My question is : how I can specify or build my .vi to say that my data incoming by ethernet?

With "automation open" is it possible?


Thank you for your help.

 

0 Kudos
Message 15 of 17
(1,675 Views)

As I said, I am not able to read the help file. In general, you will need to select the right object and property. All that I see in the help file is properties - no methods. You'll have to do things in the correct order as well but unless someone can read the help file and understand it, you might be on your own, sorry.

0 Kudos
Message 16 of 17
(1,670 Views)

According to the LsvComLib.chm file, you need to start with the Lsv controller.

 

Everything should flow from there.

Message 17 of 17
(1,663 Views)