DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

rs 232 output

hello all,

 

I´m not a computer specialist and also no programmer, but I know a little Smiley Happy

 

I have now a big problem ( for me a big one )

 

I´m woking with dasylab10.0

on the RS232 connector I connected a relaiscard with a zero-modem-cable. to operate this card it needs first an initialization. only after this the single relais will work.

 

I have written in the RS232 input module some strings what are working fine, but I need those in the RS232 output module. when I now copy those strings into the output module the relais are working totally different than in the RS232 input module.

 

here is the string I put in the RS232 input module:

 

\x01\x01\x01\x01
\p2000\x03\x01\x01\x03
\p2000\x03\x01\x03\x01
\p2000\x03\x01\x07\x05
\p2000\x03\x01\x0f\x0d
\p5000\x03\x01x\00\x02

 

1. line:   initializing

2. line:   after 2 sec. the 1st relais switches to ON

3. line:   after 2 more sec. the 1st and the2nd relais switches to ON, (if I only want to switch relais 2 to ON I have to write \x03\x01\x02\x00)

4. line:   after 2 more sec. the 1st, 2nd and 3rd relais switches to ON

5. line:   after 2 more sec. the 1st, 2nd, 3rd and 4th relais switches to ON

6. line:   after 5 more sec. all relais switches to OFF

 

so this string works in the RS232 input module perfect

 

when I now put this string into the RS232 output module this happen:

 

after exact 4 sec the relais no.1 is switching to ON and then nothing goes on anymore

but when I put in then \x03\x01\x00\x02 all relais switches to OFF

 

the relais card needs 4 byte

the 1st is the command

the 2nd is the cardnumber

the 3rd is the relaisnumber in hex

the 4th is the check sum ( XOR )

 

someone here who could help me?

 

thank you in advance

0 Kudos
Message 1 of 8
(6,594 Views)

Hi,

 

the RS232 output does not support the control character \p (pause).

 

The DASYLab help says:

 

"Note  Use this control character only in command strings for Reset, Start, and Stop in the dialog box RS232 Input»Options."

0 Kudos
Message 2 of 8
(6,583 Views)

WOW holwo ! ! !

 

thank you very much for this fast answer ! ! !

 

in the german dasylab help I have not found this and since about 2 weeks I write in the german forum about this problem but nobody until now could help

 

so thanks again Smiley Happy

 

 

but when I now take those strings without the \p2000 and \p5000 nothing will work except the initialization.

 

let me just introduce my project:

 

I have a ferrari testarossa koenig competition with up to 1000 hp. I put in a lot of sensors ( thermocouples, NTC, pressure sensors, PT100 ). during driving I can not look always to the monitor so I put 4 small emergency lamps into the dashboard. those lamps I would like to switch on when I turn the ignition on and after 5 seconds they should switch off. but not all. I have 1 light for electricity for the sensor system, 1 light for the engine, 1 light for the gearbox and 1 light for "EMEGENCY STOP". so as long as the engine is not running I need the engine, the gearbox and the emergence stop light burning, and after the engine runs they may shut off.

on the elctricty lamp there is connected: power for the NTC, power for the pressue sensors and power for the Pt100

on the gearbox lamp: oil pressure, oil temperature on several parts of the gearbox

on the engine lamp: oil pressure, oil temperature, water temperature

on the emergency stop lamp: 16 thermocouples of the exhausts and the turbo, gearbox oil pressure and temperature, engine oil pressure and temperature

 

how can I make it so, that after turning on the ignition those 4 lamps go on for a short time that I know they are working?

may be it is posisble to use the RS232 input module for this? or how can I write a string with those 5 seconds? it is no need that those lamps switch on one after the other, they may turn on all at the same time.

 

I only send on - off, nothing else, so I think not so difficult???

 

for imagine how all looks I attach a few pictures

Download All
0 Kudos
Message 3 of 8
(6,581 Views)

hello holwo,

 

as written in the german dasylab forum here is the screenhot of my help page.

you see it looks much different than this you sent.

 

how have I to wrte a string for initialzing the relaiscard and also test the single relais on the card if they work or not in the RS232 out module?

only to initialize the card is working. also to control the single relais it works. the problem is only to write a string to test the relais before starting a measurement.

0 Kudos
Message 4 of 8
(6,557 Views)

We are shipping DASYLab 12, and we have continued to update and revise the Help, both in German and English.

I would guess that the revision of the Help for V10 missed some settings, because it was a complete revision, moving from the old style help to the CHM style help. 

 

When I look at your long list of things to do, I think that you might succeed better if you used a series of strings, stored as Global Variables, and then use some timing functions and the Action module to send the strings according to your schedule or other user or data events.

 

So the worksheet is one RS232 Output with one channel and the format is something like [a]\r

 

the [a] will be replaced by a Global string contents when you use the Action module to send a string to that RS232 Output.

 

Maybe Holwo can say this again using the German module names? 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 5 of 8
(6,546 Views)

THANKYOU sooo much CJ_Butler__DAS for this info  ! ! !Smiley Happy

 

I already thaught about this with the help page and just have written again to holwo in the german forum.

 

this with the global variables I already thaught about too.

 

my porblem is that I don´t know how to separate in 1 string the commands. the relaiscard needs for each step 4 byte. when I now write those 4 byte it is working. but when I write for example 8 byte the relaiscard only accept the first 4 byte, the other byte the card is not caring about. so I need a "special sign"  to separate those two commands. in the RS232 input module I make this with the \p, but how can I do this in the output module?

 

but also I wonder how I could put in 1 global variable those strings at the same time without a "special sign" ( in german: steuerungszeichen ) ???

 

I hope holwo will answer me again beause for me as a non computer specialist it is very hard to go on alone.

 

thank you again

0 Kudos
Message 6 of 8
(6,538 Views)

hello again CJ_Butler__DAS !

 

I got just before form holwo a complete diagram/file how it could work and had only to modify a little for this I wanted to have .

 

so thank you again very much for your help.

 

my dasy lab version is 10.0. holwo is working with 12.0, so I think the differences with the helppages are because of the 2 different versions

0 Kudos
Message 7 of 8
(6,533 Views)

That's good.... thank you for the update.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 8 of 8
(6,531 Views)