Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

modscan question

 

Modbus is totally new to me. So it would be greatly appreciated if anyone could help me figuring out any basic mistakes I made.

 

 I would like to get the resistance value form the device, based on the instruction from the manufacture, this is how I configure the Master query based on the instructions from the manufacture.

 

199 = Modbus Unit Address

03 = Read Function

03 = 30003 = Starting Register

 

 

Here is the instruction from the manufacture

 

AI Registers (Analog Inputs): 16 bit integer Data fields offset by 4096 (no offset for Status Word, AI0, or ADC counts, AI6-8); sent as four hexadecimal digits per register; after the “>xxLyyyy??\r” command (yyyy is four digit hex. bitmap of registers requested). Unit answers with “Aaaaabbbbccccdddd....\r” (aaaa,bbbb,.... , are values corresponding to registers requested.)

 

30003 (address for register)   AI2: Detection Resistance 

 

Typically, a network of SIM’s will be connected to the RS 485 network and powered with all addresses still set to the factory default of 199. Then, one by one they will be forced to address 00. While temporarily at address 00, a new, unique address value will be written to register 40011, then the jumper clip is removed and that individual SIM unit assumes it’s new network address.

0 Kudos
Message 1 of 4
(3,946 Views)

Hello,

 

When working with the LabVIEW Modbus Libray, there are a couple things to keep in mind.   When you set the enum in the cluster constant to Read Holding Registers,it automatically sets the 3 that most devices look for to know it's a read.  Then you need to enter the registers you need to read, the starting register.  

  

Let me know if you've got any other questions, 

 

Meghan R

Applications Engineer 

National Instruments

 

0 Kudos
Message 2 of 4
(3,929 Views)

Thanks for answering my question.

Could you be more specific, like which parameteres I got wrong?

I keep getting a timed out error when using the attached code.

 

thank you

0 Kudos
Message 3 of 4
(3,916 Views)

Hi,

 

This tutorial should help you getting started, Introduction to MODBUS.

 

What I was trying to explain in the previous post was in the constant below, you need to verify that where you have 3 and 1 (the numeric constants within the cluster constant) that those are the actual numbers you should be using, which is information you would get from the manual.  

 


Thanks, 

 

Meghan 

Applications Engineer

National Instruments

0 Kudos
Message 4 of 4
(3,900 Views)