05-30-2024 08:25 AM
Assume a 8-bit device and its register address is 10, baud rate of 9600, communication protocol is RS-232 and I want to send a command in Binary or HEX to extract some data. Do you think VISA is the right tool to achieve that? If it is, how do I set up my command so that it can achieve what I am describing above? or Is there any other data communication tool that can help me achieve what I want to achieve? Please let me know.
With the code attached, my main problem is I am not sure where to put the register address of the device, also how to send binary or Hex using VISA.
Solved! Go to Solution.
05-30-2024 08:54 AM
Hi GRCK,
@GRCK5000 wrote:
Assume a device … baud rate of 9600, communication protocol is RS-232 and I want to send a command in Binary or HEX to extract some data. Do you think VISA is the right tool to achieve that?
According to your description of the communication port VISA should be fine to talk with your device…
@GRCK5000 wrote:
Assume a 8-bit device
What is a "8-bit device"?
@GRCK5000 wrote:
If it is, how do I set up my command so that it can achieve what I am describing above?
Read the manual of your device and communicate with it as described in that manual!
@GRCK5000 wrote:
With the code attached, my main problem is I am not sure where to put the register address of the device, also how to send binary or Hex using VISA.
Just because there are "memory access" functions for some very special hardware supported by NI doesn't mean you can use those functions as "generic purpose for any kind of obscure hardware"!
Again: read the manual of your device. Then watch this video…
05-30-2024 08:55 AM
Hi
Yes Visa is the right tool to do what you want.
In order to write in Hex, you can right click on top of the string indicator you are going to read/write and select HEX display
you need to know the proper command access the register you want. The documentation of the device will have the communication protocol.
05-30-2024 09:18 AM - edited 05-30-2024 09:19 AM
@GRCK5000 wrote:
Assume a 8-bit device and its register address is 10, baud rate of 9600, communication protocol is RS-232 and I want to send a command in Binary or HEX to extract some data. Do you think VISA is the right tool to achieve that? If it is, how do I set up my command so that it can achieve what I am describing above? or Is there any other data communication tool that can help me achieve what I want to achieve? Please let me know.
With the code attached, my main problem is I am not sure where to put the register address of the device, also how to send binary or Hex using VISA.
What exactly is the device you are attempting to communicating with?
Because needing a register address makes me think this is using MODBUS protocol.
There is a full featured MODBUS Library for LabVIEW available through VIPM that simplifies reading and writing MODBUS registers.
05-31-2024 12:49 AM
Thank you all for your answers!!! They are all helpful.