Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitoring DATAKOM DKM 409 Data RS485 modbus output

Solved!
Go to solution


Hi everyone

My project is controlling a furnace and im using DATAKOM DKM 409 that have modbus rs485 output. in this project i want to monitor the data by using labview.  due to do this i use a RS 485 to RS 232 converter but when i connect them to each other and to my pc there is no recognizing machine and when i want to use visa in LV it cant recohnie any connected device to it and give me below error:

LabVIEW:  (Hex 0xBFFF009E) VISA or a code library required by VISA could not be located or loaded.  This is usually due to a required driver not being installed on the system.

my converter is as this link:

http://www.securitycamera2000.com/products/CCTV-RS232-to-RS485-PTZ-Converter-For-DVR.html

please give me guide about what is wrong in my project. I really dont know why i can't config my visa port and my visa source is not recognized

thnks

Erfan Shahsavari

0 Kudos
Message 1 of 17
(6,899 Views)

Hi erfan_sh

 

I would like to confirm some details from your system:

 

- What is not being recognized? The RS232-RS485 converter or the DATAKOM DKM 409?

- Do the RS232-RS485 converter or the DATAKOM DKM 409 come with any additional installer?

- Is there any software tool you can use to communicate with the DATAKOM DKM 409 other than LV?

- Are you planning on using VISA VIs to communicate through Modbus with the DATAKOM DKM 409? Or are you planning on using a Modbus API or IO Server?

 

WenR

0 Kudos
Message 2 of 17
(6,874 Views)

Hi WenR

 

Now I change my converter and I’m using a RS485 to USB converter. The new converter have driver and after plugging in be recognized as COM5. But still communication with analyzer is not achieved.

About your questions, DATAKON DKM 409 has no installer and there is no software to communicate with DATAKON DKM 409 and I want to communicate by using visa Vis.

 

So grateful cause of your consideration

Erfan Shahsavari

0 Kudos
Message 3 of 17
(6,851 Views)

If your LabVIEW license doesn't include the DSC module or LabVIEW RT, which allows you to use the IO Server, take a look at the LabVIEW Modbus API

0 Kudos
Message 4 of 17
(6,843 Views)

erfan_sh

 

 

As chembo, I would recommend you to use the Modbus Library instead. It will probably save you a lot of development time, and you will be able to find more people in the community to share your concerns as well. Is there any particular reason why you choose Visa VIs for this project?

 

WenR

0 Kudos
Message 5 of 17
(6,824 Views)

I'm so appreciate for your comment but my analyzer output is VISA modbus and i think with serial port (MODBUS RTU RS485) using if MODBUS API is not possible. My problem is initializing the conversation between labview and my analyzer by using serial port of labview.


Thanks guys

0 Kudos
Message 6 of 17
(6,809 Views)

erfan_sh

 

According to my understanding, the Modbus library should work with RS485 RTU as well, as you can see in the next thread and in other forum posts as well.  Modbus RTU via RS485

 

Now, as you say, you can also use the VISA VIs, however, the Modbus library is built on VISA VIs as well, and has the required code for Modbus implemented already. The error that you receive seems to indicate that the NI VISA driver in your computer is corrupted or not installed at all, I would recommend you to uninstall it and reinstall it, just be careful to install a compatible version with your LabVIEW version. Here some forums about the error that you receive:

 

Forum 1Forum 2,

 

Also, this error happens when NI VISA conflicts with other VISA drivers, as you can see from this document: Configuring NI-VISA as the Primary VISA, this other forum talks about this error, and fixing it through the reinstallation of VISA RunTime, as the document above suggests. 

 

Forum 3

 

Have a good day!

 

WenR

0 Kudos
Message 7 of 17
(6,797 Views)
Solution
Accepted by topic author erfan_sh

Hello Dear All

 

Here is the response and consequence of my work:

1-in the manual of my devise note that we can choose device id from 1 to 253 and I chose 240 but this was a mistake and I must set device ID between 1to 32. (If I want to choose more than 32 a repeater must be used)

2-acoording to its user manual the register addresses are between 40001 to 40095 for example 40068 and due to MODBUS RTD structure (Device id, function code, starting register address, number of registers to read , CRC check) I must set register addresses 40068, but it was a mistake and this was wrong. The correct register address is 68 not 40068. And in the MODBUS structure I must use 68 not 40068 or by using modbus library I must use 68 as register address not 40068.

 

Thanks for your guides

0 Kudos
Message 8 of 17
(6,394 Views)

Hi,

 

Just to make some thing more clear:

 

1) The Device ID is the actual ModBus address. An address of 240 should be OK. You can choose any address from 1 till 240. Above 240 is not always supported. Address 0 is used for broadcast. If you use RS-485 and all connection have a load of 1 (see datasheets of the IC manufacturers) you can connect as many as 32 devices with a RS-485 interface. Above the 32 devices you have to use repeaters for every segment of 32 devices.

 

2) ModBus addresses at higher level systems like DCS are represent as the function code and the four digits of the ModBus address + 1. So 40068 at DCS is use ModBus function code 4 and address 67. 

Check you address you might be reading the wrong data !!

 

Kees

0 Kudos
Message 9 of 17
(6,383 Views)

@K C wrote:

..............................

 

2) ModBus addresses at higher level systems like DCS are represent as the function code and the four digits of the ModBus address + 1. So 40068 at DCS is use ModBus function code 4 and address 67. 

Check you address you might be reading the wrong data !!

 

Kees


I just finished a small Modbus TCP communication project. This time I used the Modbus API instead of DSC. The API is much easier to use and more flexible. And Kees is right. The Modbus API starts all addresses at 0, so I needed to adjust by -1 the addresses listed in the manual of the device I was communicating with.

   

0 Kudos
Message 10 of 17
(6,364 Views)