04-09-2018 07:17 AM
Hi, I am trying to connect some ADAM modules to LabView and use them to control different characteristics of a testing chamber. A complete VI was design for this system a very long time ago(10 years or more) that was working. Sadly that version is running on Labview 7.1 and for some reason stopped working. My job is to remake the connection and the capabilities of the system on a newer version of Labview.
After a week of research and googling I am still unable to connect the LabView to the ADAM modules.The modules that I am working with are (4520 converter, 4018,4017 and 4021). The old system was using the drivers from Advantech together with the afferent VI that where used for open controlling and closing the modules. On the new version of LabView they are not working anymore because they have a "Code interface Node". I know that they should be replaced with the "Call library function Node" but i can't obtain the required DLL files for them.
I want to mention that I can see the modules, set them up, and they are responding perfect through serial communication(in the command terminal) in the DCON_Utility software. I also tried direct serial communication using VISA , but no respond back was obtained.
I just want to know if anybody encountered this problem or using the ADAM-4000 on a newer version of Labview. Maybe is there a newer version of the drivers used for Labview, or maybe a way to design the serial communication directly from LabView to the modules.
Thank you in advance and if any other clarifications are necessary don't hesitate to ask me.
Have a nice day people.
Solved! Go to Solution.
04-09-2018 07:47 AM
I worked with ADAM 4000 modules for years, but never used the LabVIEW driver.
It's relatively easy to interface those modules by means of VISA. I partly inherited the code, partly coded myself.
However, I don't need all the commands, only some configuration and simple read of the modules current value.
I know that there is a .NET 2.0 component to interface them, although I used it only once as an example for an ADAM 6000 series module (I ended up using MODBUS code though).
04-09-2018 08:05 AM
Do you have by any chance a VI example with that VISA communication? just a simple read/write and I will try to figure it out from there? The given ones from LabView are not working for some reason.
04-09-2018 09:08 AM
See some examples in the attachment. Not well documented I fear. However the code in itself is simple. Especially if you have some experience in using VISA.
04-10-2018 03:57 AM
Thank you very much for the examples that you provided, sadly they are not working. Even the most basic VISA configuration can't work with the modules.No response and also "no blinking" on the module(a visual signal that something(a command) was received. The only way the modules are communicating with the pc is with the commands like #01, #05 etc. This is from the specification manual of the modules. all the answers are correct but I can't obtain the same result with Labview. I really hope that maybe somebody has an explication or something regarding this frustrating problem.
P.S. I don't have experience with VISA but it looks to me that is basic serial communication protocol and instructions.
04-10-2018 04:15 AM
If you don't know much about VISA, you may be missing something.
What's the serial port you are using and the ID of the AO module?
I will build a vi that should work standalone.
04-10-2018 04:44 AM
The serial port that I am using is COM5 and regarding the ID of the AO I don't think I know exactly at what part you are referring to and I don't want to give you wrong information. Can you ask in a different way, or maybe more specifically the question regarding the AO? Thank you very much for the speed that you are answering to me.
04-10-2018 04:54 AM
I mean the address of the module. Since many modules can be connected over one RS-485 line, a unique numeric ID can be assigned to each module. Every command contains the ID of the target module. If the ID is wrong, the module will never get the command. The factory set ID is 1.
Another problem may be the checksum. A checksum field can be enabled in the protocol, however my vi's assume that there is no checksum.
Those configurations can be checked by means of the Advantech's ADAM .NET utility.
04-10-2018 04:58 AM
I was thinking that will be the case also, so below I attached a print screen with all the modules from the utility software for you. regarding the checksum is disable in my case too.
04-10-2018 05:01 AM
I don't know if it will make a difference but the serial communication goes as following; USB-RS232 CONVERTER->ADAM(4520) converter from rs232 to rs485. I was thinking to mention this also in case it helps.